ur5 based workcell not loading in rviz

asked 2022-02-09 11:06:25 -0500

zahid990170 gravatar image

Hi,

I am creating custom workcell urdf model for ur5 robotic arm based on the standard urdf file ur5.urdf.xacro that is available in the ur_description package of universal robots. My custom workcell xacro file digi2.xacro looks as follows. The idea is to add a table surface where ur5 is mounted on.

<?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>

when I input digi2.xacro to the moveit setup assistant, it is correctly loaded as shown below:

image description

When, MSA wizard completes, I can successfully compile my workspace and package that was created using the MSA.

However when I run

roslaunch cth_pkg demo.launch

I get rviz with no workcell (ur5 or table surface visible) as shown below.

image description

I see the following error on terminal.

[ERROR] [1644425995.588476488]: Exception caught while processing action 'loadRobotModel': Character [-] at element [45] is not valid in Graph Resource Name [/robot_description_planning/joint_limits/base-tool0_controller_floating_joint/trans_x/max_position].  Valid characters are a-z, A-Z, 0-9, / and _.

Based on the recommendations given in ur_modern_driver README.md file, This driver broadcasts a transformation between the base link and the end-effector as reported by the UR. The default frame names are: base and tool0_controller.

To use the tool0_controller frame in a URDF, there needs to be a link with that name connected to base. For example:

```

<!-- Connect tool0_controller to base using floating joint -->
<link name="tool0_controller"/>
<joint name="base-tool0_controller_floating_joint" type="floating">
  <origin xyz="0 0 0" rpy="0 0 0"/>
  <parent link=base"/>
  <child link="tool0_controller"/>
</joint>

```

I had added the following

<link name="${prefix}tool0_controller"/>
<joint name="${prefix}base-tool0_controller_floating_joint" type="floating">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <parent link="${prefix}base"/>
    <child link="${prefix}tool0_controller"/>
</joint>

to the end of ur5.urdf.xacro.

Why I am getting this error, and why is the model not loading correctly.

Please, any help or suggestions in this regards,

thanks,

Zahid

edit retag flag offensive close merge delete