UR5 mounted on table collides with the table at runtime
Hi all,
I have a ur5
robotic arm that is mounted on a table surface. I have created a urdf
of the workspace digi2.xacro given as follows:
<?xml version="1.0" ?>
<robot name="ur5" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:include filename="$(find ur_description)/urdf/ur5.urdf.xacro" />
<xacro:ur5_robot prefix="" joint_limited="true"/>
<link name="world"/>
<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>
I have created by moveit package by running through MoveIt Setup Assistant
(MSA). The idea being that, the table surface was taken into account when generating the collision matrix. The screen shot when I run the demo.launch file is shown below.
As, it shows a wide flat table surface beneath the robotic arm. However, when running on the real robotic arm hardware, at times, I see the robotic arm going down the table, hitting and then emergency stopping. Why is it that happening? Do I have to change the origin tag in the xacro file. Do I have to use a mesh, instead of simple box primitive? Please can you provide any suggestions in this regards.
EDIT 1
I've made some small changes to the workcell xacro file. I will add here,
- the input xacro file
- the generated srdf file
- the screenshot from demo.launch
workcell.xacro
<?xml version="1.0" ?>
<robot name="myworkcell" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:include filename="$(find ur_description)/urdf/ur5.urdf.xacro" />
<xacro:ur5_robot prefix="" joint_limited="true"/>
<link name="world"/>
<link name="table">
<visual>
<geometry>
<box size="1.0 1.0 0.05"/>
</geometry>
</visual>
<collision>
<geometry>
<box size="1.0 1.0 0.05"/>
</geometry>
</collision>
</link>
<joint name="world_to_table" type="fixed">
<parent link="world"/>
<child link="table"/>
<origin xyz="0 0 0.5" 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>
myworkcell.srdf
<?xml version="1.0" ?>
<!--This does not replace URDF, and is not an extension of URDF.
This is a format for representing semantic information about the robot structure.
A URDF file must exist for this robot as well, where the joints and the links that are referenced are defined
-->
<robot name ...
I tried to do something similar by mounting the ur5e arm on a surface. After doing so my I tried to move to arm to a pose goal but it did not generate a plan. Do I need to create a new move it package after adding the surface into the urdf file?
The following error message was displayed : manipulator/manipulator[RRTConnectkConfigDefault]: Unable to sample any valid states for goal tree