This commit is contained in:
Quella777
2025-08-25 16:30:02 +08:00
commit 32cc2a8e96
1633 changed files with 289456 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<model>
<name>Ladder 75 Degrees 0 Handrails </name>
<version>1.0</version>
<sdf version="1.5">model.sdf</sdf>
<author>
<name>Jackie Kay</name>
<email>jackie@osrfoundation.com</email>
</author>
<description>
A ladder with 0 handrails and a 75 degree incline from the floor.
</description>
</model>

View File

@@ -0,0 +1,288 @@
<?xml version="1.0"?>
<sdf version="1.5">
<%
# Constant declarations
ladder_angle = 70 # degrees
ladder_rad = ladder_angle*Math::PI/180
handrails = 0
num_steps = 8
height = 2.4 # meters
width = height/Math.tan(ladder_rad)
model_name = "ladder_"+ladder_angle.to_s+"deg_"+handrails.to_s+"rails"
step_size = [0.9, 0.1016, 0.0381]
step_density = 2800
step_mass = step_density*step_size[0]*step_size[1]*step_size[2]
step_ixx = step_mass/12.0 * (step_size[1]**2+step_size[2]**2)
step_iyy = step_mass/12.0 * (step_size[2]**2+step_size[0]**2)
step_izz = step_mass/12.0 * (step_size[0]**2+step_size[1]**2)
landing_y = 0.6 #dimension of the landing in y
landing_mass = step_density*step_size[0]*landing_y*step_size[2]
landing_ixx = landing_mass/12.0 * (landing_y**2+step_size[2]**2)
landing_iyy = landing_mass/12.0 * (step_size[2]**2+step_size[0]**2)
landing_izz = landing_mass/12.0 * (step_size[0]**2+landing_y**2)
%>
<model name= <%= '"'+model_name+'"' %> >
<static>true</static>
<% # Steps: linearly interpolate positions
step_inc_z = height/(num_steps+1)
step_inc_y = width/(num_steps+1)
step_z = (1..(num_steps)).to_a.collect{ |n| n * step_inc_z }
step_y = (1..(num_steps)).to_a.collect{ |n| n * step_inc_y }
for i in (0..num_steps-1)
%>
<link name=<%= '"step'+i.to_s+'"'%> >
<pose>0 <%= step_y[i]%> <%= step_z[i] %> 0 0 0 </pose>
<inertial>
<mass> <%= step_mass %></mass>
<inertia>
<ixx> <%= step_ixx %></ixx>
<iyy> <%= step_iyy %></iyy>
<izz> <%= step_izz %></izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size> <% for i in (0..2) %> <%= step_size[i] %> <% end %> </size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> <% for i in (0..2) %> <%= step_size[i] %> <% end %> </size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<% end %>
<% #Landing %>
<link name="landing">
<pose>0 <%= width+landing_y/2 %> <%= height %> 0 0 0 </pose>
<inertial>
<mass> <%= landing_mass %></mass>
<inertia>
<ixx> <%= landing_ixx %></ixx>
<iyy> <%= landing_iyy %></iyy>
<izz> <%= landing_izz %></izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size> <%= step_size[0] %> <%= landing_y %> <%= step_size[1] %></size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> <%= step_size[0] %> <%= landing_y %> <%= step_size[1] %></size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<% #Walls--0 is the left side, 1 is left
for i in (0..1)
side = i == 0 ? 'left' : 'right'
wall_x = step_size[0]/2 * (i*2-1)
wall_sides = [0.0508, Math.sqrt(height**2+width**2)+0.08, 0.13]
%>
<link name=<%= '"'+side+'_side_wall"' %> >
<pose><%= wall_x%> <%= width/2%> <%= height/2%> <%= ladder_rad %> 0 0 </pose>
<collision name="collision">
<geometry>
<box>
<size><% for i in (0..2) %> <%= wall_sides[i] %> <% end %></size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size><% for i in (0..2) %> <%= wall_sides[i] %> <% end %></size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<% end %>
<% #Railing
rail_height = 0.7
rail_radius = 0.02413
delta_h = rail_height/Math.cos(ladder_rad)
delta_w = rail_height/Math.sin(ladder_rad)
rail_length = Math.sqrt((height+delta_h)**2 + (width+delta_w)**2)
#rail_length = Math.sqrt(height**2 + width**2) + rail_height/Math.tan(ladder_rad) + rail_height*Math.tan(ladder_rad)
if handrails > 0
for i in (0..handrails-1)
side = i == 0 ? 'left' : 'right'
rail_x = step_size[0]/2 * (i*2-1)
%>
<link name=<%= '"'+side+'_railing_long"'%> >
<pose><%= rail_x%> <%= width/2 - delta_w %> <%= height/2 + delta_h %> <%= ladder_rad-Math::PI/2%> 0 0 </pose>
<collision name="collision">
<geometry>
<cylinder>
<radius><%= rail_radius%></radius>
<length><%= rail_length%></length>
</cylinder>
</geometry>
</collision>
<visual name="visual">
<geometry>
<cylinder>
<radius><%= rail_radius%></radius>
<length><%= rail_length%></length>
</cylinder>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<% for j in (0..num_steps/2-1)
upright_y = j * width / (num_steps/2-1) - rail_height*Math.sin(ladder_rad)/2
upright_z = j * height / (num_steps/2-1) + rail_height*Math.cos(ladder_rad)/2
%>
<link name=<%= '"'+side+'_railing_upright'+j.to_s+'"' %> >
<pose> <%= rail_x %> <%= upright_y %> <%= upright_z%> <%= ladder_rad %> 0 0 </pose>
<collision name="collision">
<geometry>
<cylinder>
<radius><%= rail_radius%></radius>
<length><%= rail_height - rail_radius - wall_sides[2]%></length>
</cylinder>
</geometry>
</collision>
<visual name="visual">
<geometry>
<cylinder>
<radius><%= rail_radius%></radius>
<length><%= rail_height - rail_radius - wall_sides[2]%></length>
</cylinder>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<% end %>
<link name=<%= '"'+side+'_railing_landing_top"' %> >
<pose> <%= rail_x %> <%= width+landing_y/2 %> <%= height+rail_height/Math.cos(ladder_rad) - wall_sides[2] %> <%= Math::PI/2 %> 0 0 </pose>
<collision name="collision">
<geometry>
<cylinder>
<radius><%= rail_radius%></radius>
<length><%= landing_y%></length>
</cylinder>
</geometry>
</collision>
<visual name="visual">
<geometry>
<cylinder>
<radius><%= rail_radius%></radius>
<length><%= landing_y%></length>
</cylinder>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<% for j in (0..1)
rail_y = width
rail_z = rail_height/Math.cos(ladder_rad) - wall_sides[2]
%>
<link name=<%= '"'+side+'_railing_landing_upright_'+j.to_s+'"' %>>
<pose><%= rail_x %> <%= width + j*landing_y %> <%= height+rail_z/2 %> 0 0 0</pose>
<collision name="collision">
<geometry>
<cylinder>
<radius><%= rail_radius%></radius>
<length><%= rail_z%></length>
</cylinder>
</geometry>
</collision>
<visual name="visual">
<geometry>
<cylinder>
<radius><%= rail_radius%></radius>
<length><%= rail_z%></length>
</cylinder>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<% end %>
<% end %>
<% end %>
</model>
</sdf>

View File

@@ -0,0 +1,387 @@
<?xml version="1.0"?>
<sdf version="1.5">
<model name= "ladder_70deg_0rails" >
<static>true</static>
<link name="step0" >
<pose>0 0.09705872913765398 0.26666666666666666 0 0 0 </pose>
<inertial>
<mass> 9.7548192</mass>
<inertia>
<ixx> 0.009571241631672</ixx>
<iyy> 0.6596303120915761</iyy>
<izz> 0.666841521540096</izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<link name="step1" >
<pose>0 0.19411745827530796 0.5333333333333333 0 0 0 </pose>
<inertial>
<mass> 9.7548192</mass>
<inertia>
<ixx> 0.009571241631672</ixx>
<iyy> 0.6596303120915761</iyy>
<izz> 0.666841521540096</izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<link name="step2" >
<pose>0 0.2911761874129619 0.8 0 0 0 </pose>
<inertial>
<mass> 9.7548192</mass>
<inertia>
<ixx> 0.009571241631672</ixx>
<iyy> 0.6596303120915761</iyy>
<izz> 0.666841521540096</izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<link name="step3" >
<pose>0 0.3882349165506159 1.0666666666666667 0 0 0 </pose>
<inertial>
<mass> 9.7548192</mass>
<inertia>
<ixx> 0.009571241631672</ixx>
<iyy> 0.6596303120915761</iyy>
<izz> 0.666841521540096</izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<link name="step4" >
<pose>0 0.48529364568826994 1.3333333333333333 0 0 0 </pose>
<inertial>
<mass> 9.7548192</mass>
<inertia>
<ixx> 0.009571241631672</ixx>
<iyy> 0.6596303120915761</iyy>
<izz> 0.666841521540096</izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<link name="step5" >
<pose>0 0.5823523748259238 1.6 0 0 0 </pose>
<inertial>
<mass> 9.7548192</mass>
<inertia>
<ixx> 0.009571241631672</ixx>
<iyy> 0.6596303120915761</iyy>
<izz> 0.666841521540096</izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<link name="step6" >
<pose>0 0.6794111039635778 1.8666666666666667 0 0 0 </pose>
<inertial>
<mass> 9.7548192</mass>
<inertia>
<ixx> 0.009571241631672</ixx>
<iyy> 0.6596303120915761</iyy>
<izz> 0.666841521540096</izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<link name="step7" >
<pose>0 0.7764698331012319 2.1333333333333333 0 0 0 </pose>
<inertial>
<mass> 9.7548192</mass>
<inertia>
<ixx> 0.009571241631672</ixx>
<iyy> 0.6596303120915761</iyy>
<izz> 0.666841521540096</izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> 0.9 0.1016 0.0381 </size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<link name="landing">
<pose>0 1.1735285622388858 2.4 0 0 0 </pose>
<inertial>
<mass> 57.607200000000006</mass>
<inertia>
<ixx> 1.735184598966</ixx>
<iyy> 3.8954545989660008</iyy>
<izz> 5.616702</izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size> 0.9 0.6 0.1016</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> 0.9 0.6 0.1016</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<link name="left_side_wall" >
<pose>-0.45 0.43676428111944293 1.2 1.2217304763960306 0 0 </pose>
<collision name="collision">
<geometry>
<box>
<size> 0.0508 2.6340266539421893 0.13 </size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> 0.0508 2.6340266539421893 0.13 </size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
<link name="right_side_wall" >
<pose>0.45 0.43676428111944293 1.2 1.2217304763960306 0 0 </pose>
<collision name="collision">
<geometry>
<box>
<size> 0.0508 2.6340266539421893 0.13 </size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size> 0.0508 2.6340266539421893 0.13 </size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>