Rosanswers logo

Dear All,

I have been trying to create a URDF file for a collaborative arm (the Universal Robots UR10e) with a Robotiq gripper (the 3-fingers one).

I have downloaded the packages of Universal Robots here and Robotiq here.

I have also followed this guide on ROS wiki for installing dependencies for that Robotiq package.

I have, as per usual, git cloned the packages inside a folder called src located in ~/catkin_ws/. I have then ran catkin_make when in catkin_ws directory. I can play with the launch files of the UR and Robotiq packages without issues.

I am trying to create a custom URDF file inside of a package I made myself called cobot, which is located in the ~/catkin_ws/src/ directory with the other two packages. I have created it using catkin_create_pkg in the terminal. I have also created another package inside of cobot, called cobot_description (all these packages have been built too and I have sourced the setup.bash). Here I have made a urdf folder in which I have created a file with the following code:

<?xml version="1.0"?>
<robot xmlns:xacro="http://wiki.ros.org/xacro" name="ur10e_robotiq">

  <!-- common stuff -->
  <xacro:include filename="$(find ur_e_description)/urdf/common.gazebo.xacro" />

  <!-- include macros for UR10e and Robotiq 3f hand -->
  <xacro:include filename="$(find ur_e_description)/urdf/ur10e_robot.urdf.xacro" />
  <xacro:include filename="$(find robotiq_3f_gripper_visualization)/cfg/robotiq-3f-gripper_articulated_macro.xacro" />

  <!-- create the robot + eef combo itself as a macro -->
  <xacro:macro name="ur10e_with_robotiq" params="prefix">

    <!-- instantiate UR10e and Robotiq 3f hand -->
    <xacro:ur10e_robot prefix="${prefix}robot_" joint_limited="false"/>
    <xacro:robotiq-3f-gripper_articulated prefix="${prefix}gripper_" />

    <!-- attach gripper to UR10e -->
    <joint name="${prefix}ee_link-${prefix}robotiq_3f_base_link" type="fixed">
      <origin xyz="0 0 0" rpy="0 0 0" />
      <parent link="${prefix}ee_link" />
      <child link="${prefix}palm" />

<xacro:ur10e_with_robotiq prefix=""/>


Following the ROS answers thread and ROS wiki guide.

As the code tells, I am including two macros from the packages of UR and Robotiq and trying to connect the Robotiq hand to the end effector of the UR: parent link="${prefix}ee_link". However, when visualizing the URDF through Visual Studio's ROS extension, using ROS:Preview URDF tool, the UR appears fine in the RViz windows, but the Robotiq hand appears under the UR base, at the origin. Changing the xyz and rpy values in the origin block inside the joint between the end effector and robotiq hand's palm doesn't change anything.

I have checked that inside the macro I call, robotiq-3f-gripper_articulated_macro.xacro the first link is called palm. Also, the end effector link of the UR10e is called ee_link. I have tried changing links here. I have also tried using another xacro from Robotiq's package, although I am sure this is the correct one.

Lastly, I have tried to browse and upload this URDF inside of MoveIt! Setup Assistant, obtaining this Error: URDF/COLLADA file is not a valid robot model.

What am I doing wrong?

I cannot upload the image of the URDF depicted in the ROS:Preview URDF tool because I don't have 5 points or more.

Thank you!

P.S. Using ROS melodic on 18.04 LTS.

Originally posted by nndei on ROS Answers with karma: 3 on 2021-06-30

Post score: 0


1 Answer 1


Rosanswers logo

The problem is likely with the parent link of the joint you use to couple the gripper to the robot.

You instantiate the robot xacro like this:

<xacro:ur10e_robot prefix="${prefix}robot_" joint_limited="false"/>

Note the value for prefix: robot_.

You then specify the following as the parent link:

<parent link="${prefix}ee_link" />

So basically: ee_link.

But the prefix for the robot's xacro:macro was robot_, so there is no ee_link, only robot_ee_link.

The same for the gripper.

You'll probably want to change things to:

<joint name="${prefix}ee_link-${prefix}robotiq_3f_base_link" type="fixed">
  <origin xyz="0 0 0" rpy="0 0 0" />
  <parent link="${prefix}robot_ee_link" />
  <child link="${prefix}gripper_palm" />

Originally posted by gvdhoorn with karma: 86574 on 2021-07-01

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by nndei on 2021-07-01:
Thank you, @gvdhoorn. You are absolutely correct and I am sorry for missing that out.

Hopefully, I will not make the same mistake again.

Best regards

Comment by gvdhoorn on 2021-07-01:
No need to apologise. It's an easy thing to miss.

Comment by nndei on 2021-07-01:
May I add here a question on which link is better suited for connecting the Robotiq gripper? Is my choice of ee_link correct or should I opt for tool0? Online info is contradictory.

Comment by gvdhoorn on 2021-07-01:
It isn't recommended to post follow-up questions as comments under questions with already accepted answers. Visibility of such questions is really low.

It'd be better to post a new question (which refers to your previous one).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.