Link UR5 Robot and Robotiq 3 Finger Gripper

asked 2017-02-20 03:34:54 -0600

Rhemus gravatar image

updated 2017-03-14 07:13:19 -0600

Hey guys, im not very experienced using ROS. I want to add a Robotiq 3 finger gripper on a UR5 robot and simulate both in Gazebo to control it using MoveIt. I got the packages for the gripper link text and for the robot link text but how can i link them together? Im using Ros Indigo on Ubuntu 14.04. Thanks for your support!

Edit: Ok i tried this:

    <?xml version="1.0"?>
<robot name="ur5_gripper" xmlns:xacro="">
  <!-- include macros for M-10iA and the eef model -->
  <xacro:include filename="$(find ur_description)/urdf/ur5.urdf.xacro"/>
  <xacro:include filename="$(find robotiq_c2_model_visualization)/urdf/robotiq_c2_model_macro.xacro" />

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

    <!-- instantiate M-10iA and eef model -->
    <xacro:ur5_robot        prefix="${prefix}" />
    <xacro:robotiq_c2_model prefix="${prefix}" />

    <!-- attach eef to M-10iA model -->
    <joint name="${prefix}tool0-eef_link" type="fixed">
      <origin xyz="0 0 0" rpy="0 0 0" />
      <parent link="${prefix}tool0" />
      <child link="${prefix}eef_link" />


But when i try to create a new package using the moveit_setup_assistant the terminal calls:

[ INFO] [1489484583.186546879]: Running 'rosrun xacro /home/mrk/catkin_ws/src/universal_robot-kinetic-devel/ur_description/urdf/ur5.gripper.xacro'...
[ERROR] [1489484583.574528731]: No link elements found in urdf file

The setup assistant reports an error: URDF/COLLADA file is not a valid robot model.

Edit: When i use ur_description/urdf/ur5_robot.urdf.xacro instead of ur_description/urdf/ur5.urdf.xacro the assistant loads some files but there is no gripper attached to the robot

Can someone help please? I use the files from the standard packages i mentioned before.

edit retag flag offensive close merge delete


Not a complete answer, but you'll basically have to link the two models together using a joint (at least). See this page for an example.

gvdhoorn gravatar image gvdhoorn  ( 2017-02-20 04:12:10 -0600 )edit

I am doing the same you are trying. I can't run rosdep install robotiq_modbus_tcp. And I get this error:

ERROR: Rosdep cannot find all required resources to answer your query Missing resource robotiq_modbus_tcp

Have you found a solution? and have you been succesful linking the two models?

meimar12 gravatar image meimar12  ( 2017-02-27 03:34:47 -0600 )edit

@meimar12: please don't hijack posts like this. Please post a new question.

gvdhoorn gravatar image gvdhoorn  ( 2017-02-27 07:42:59 -0600 )edit

i have not been successful till now, because i dont know which files i have to use. Do i need to add the code to ur5.urdf.xacro oder ur5_robot.urdf.xacro? And which files do i need to include here

 <!-- include macros for M-10iA and the eef model -->

in this case for the ur5 and robotiq gripper

Rhemus gravatar image Rhemus  ( 2017-03-07 06:00:04 -0600 )edit

Do i need to add the code to ur5.urdf.xacro oder ur5_robot.urdf.xacro?

neither, you create a new file.

And which files do i need to include

the ones with the macro definitions for the ur5 and the gripper. Then your new file instantiates (ie: calls) the macros. Then you add the connection.

gvdhoorn gravatar image gvdhoorn  ( 2017-03-07 06:04:24 -0600 )edit

Okay thanks i will try that. But is the new file a .urdf or .xacro or somtehing else? And how can i try to spawn the robot using the new file in moveit? I used the demo.launch file from ur5 before.

Rhemus gravatar image Rhemus  ( 2017-03-07 06:24:34 -0600 )edit

The new file is a top-level xacro (also explained on the page linked earlier), so not a urdf.

You'll have to edit the MoveIt config pkg to load your new urdf, but I would advise you to create a new MoveIt configuration package, that would be better.

gvdhoorn gravatar image gvdhoorn  ( 2017-03-07 06:35:07 -0600 )edit

Is ur_description/urdf/ur5.gripper.xacro a top-level xacro file (ie: does it instantiate your macros)? If not, that is most likely the cause of your problems.

gvdhoorn gravatar image gvdhoorn  ( 2017-03-14 06:33:05 -0600 )edit