How to add a table surface to the ur5 urdf model
Hi all,
I need some help for customizing a urdf
file based on urdf available from standard repositories. I have a ur5
robotic arm. For this arm, we have urdf
and xacro
available in ur_description
package of universal_robot
repository. Basically, our ur5
robotic arm is mounted on a surface. I want to have a "plane surface ( table ) beneath the base of the robotic arm" modeled in the urdf. This way I can include it in collision checking while generating initial configuration based on MSA
( moveit setup assistant). I took some help from similar issues posted here and here. My initial try for creating xacro called first.xacro looks as follows.
<?xml version="1.0" ?>
<robot name="indtech_cell" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:include filename="$(find ur_description)/urdf/ur5_robot.urdf.xacro" />
<link name="table">
<visual>
<geometry>
<box size="2 1.5 0.05"/>
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
<collision>
<geometry>
<box size="2 1.5 0.05"/>
</geometry>
</collision>
</link>
<joint name="world_to_table" type="fixed">
<parent link="world"/>
<child link="table"/>
<origin xyz="0 0 1" rpy="0 0 0"/>
</joint>
<joint name="table_to_robot" type="fixed">
<parent link="table"/>
<child link="base_link"/>
<origin xyz="0 0 0" rpy="0 0 0"/>
</joint>
</robot>
However, when I run the following sequence of commands.
xacro src/indtech_pkg/config/first.xacro > src/indtech_pkg/config/first.urdf
check_urdf src/indtech_pkg/config/first.urdf
I receive the following output.
---------- Successfully Parsed XML ---------------
root Link: world has 2 child(ren)
child(1): base_link
child(1): base
child(2): shoulder_link
child(1): upper_arm_link
child(1): forearm_link
child(1): wrist_1_link
child(1): wrist_2_link
child(1): wrist_3_link
child(1): ee_link
child(2): tool0
child(2): table
child(1): base_link
child(1): base
child(2): shoulder_link
child(1): upper_arm_link
child(1): forearm_link
child(1): wrist_1_link
child(1): wrist_2_link
child(1): wrist_3_link
child(1): ee_link
child(2): tool0
My thinking was that, it should be the root element world
and then the only child should be the second child tree given above.
When, I try to input first.xacro within MSA though, it loads correctly, and it shows the following.
which is ok,
My main objective here is to include the table as part of MSA collision checking, so that, when using OMPL planners, we do not receive any plans where the robotic arm is going under the surface of the table.
Please can you share your help, suggestion in this regards.
thanks,
Zahid