Skip to content

Commit

Permalink
Added ground plane to URDF for simulators (#226)
Browse files Browse the repository at this point in the history
* Added ground plane to urdf
* Added condition on simulation for ground plane
  • Loading branch information
VinDp authored Nov 28, 2024
1 parent 6746580 commit 9c8cb17
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions urdf/ur.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,38 @@

<!-- convert to property to use substitution in function -->
<xacro:property name="initial_positions_file" default="$(arg initial_positions_file)"/>
<xacro:property name="is_sim_gazebo" value="$(arg sim_gazebo)"/>
<xacro:property name="is_sim_ignition" value="$(arg sim_ignition)"/>

<!-- create link fixed to the "world" -->
<link name="world" />

<xacro:if value="${is_sim_gazebo or is_sim_ignition}">
<link name="ground_plane">
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="5 5 0"/>
</geometry>
<material name="ground_white">
<color rgba="1 1 1 0.5"/>
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="5 5 0"/>
</geometry>
</collision>
</link>

<joint name="ground_plane_joint" type="fixed">
<origin xyz="0 0 -0.01" rpy="0 0 0"/>
<parent link="world"/>
<child link="ground_plane"/>
</joint>
</xacro:if>

<!-- arm -->
<xacro:ur_robot
name="$(arg name)"
Expand Down

0 comments on commit 9c8cb17

Please sign in to comment.