Skip to content

Commit 9c8cb17

Browse files
authored
Added ground plane to URDF for simulators (#226)
* Added ground plane to urdf * Added condition on simulation for ground plane
1 parent 6746580 commit 9c8cb17

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

urdf/ur.urdf.xacro

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,38 @@
5353

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

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

62+
<xacro:if value="${is_sim_gazebo or is_sim_ignition}">
63+
<link name="ground_plane">
64+
<visual>
65+
<origin rpy="0 0 0" xyz="0 0 0"/>
66+
<geometry>
67+
<box size="5 5 0"/>
68+
</geometry>
69+
<material name="ground_white">
70+
<color rgba="1 1 1 0.5"/>
71+
</material>
72+
</visual>
73+
<collision>
74+
<origin rpy="0 0 0" xyz="0 0 0"/>
75+
<geometry>
76+
<box size="5 5 0"/>
77+
</geometry>
78+
</collision>
79+
</link>
80+
81+
<joint name="ground_plane_joint" type="fixed">
82+
<origin xyz="0 0 -0.01" rpy="0 0 0"/>
83+
<parent link="world"/>
84+
<child link="ground_plane"/>
85+
</joint>
86+
</xacro:if>
87+
6088
<!-- arm -->
6189
<xacro:ur_robot
6290
name="$(arg name)"

0 commit comments

Comments
 (0)