Link UR5 Robot and Robotiq 3 Finger Gripper
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="http://ros.org/wiki/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" />
</joint>
</xacro:macro>
</robot>
But when i try to create a new package using the moveitsetupassistant the terminal calls:
[ INFO] [1489484583.186546879]: Running 'rosrun xacro xacro.py /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.
Asked by Rhemus on 2017-02-20 04:34:54 UTC
Comments
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.
Asked by gvdhoorn on 2017-02-20 05:12:10 UTC
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?
Asked by meimar12 on 2017-02-27 04:34:47 UTC
@meimar12: please don't hijack posts like this. Please post a new question.
Asked by gvdhoorn on 2017-02-27 08:42:59 UTC
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
in this case for the ur5 and robotiq gripper
Asked by Rhemus on 2017-03-07 07:00:04 UTC
neither, you create a new file.
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.
Asked by gvdhoorn on 2017-03-07 07:04:24 UTC
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.
Asked by Rhemus on 2017-03-07 07:24:34 UTC
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.
Asked by gvdhoorn on 2017-03-07 07:35:07 UTC
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.Asked by gvdhoorn on 2017-03-14 06:33:05 UTC
ur_description/urdf/ur5.gripper.xacro
is the file i posted above. Thats the whole code. Whats missing then?Asked by Rhemus on 2017-03-14 07:06:21 UTC
That file only defines a macro called
ur5_robotiq
, but the macro is never 'called' / instantiated anywhere. You need a file like this (but then callxacro:ur5_robotiq
).Asked by gvdhoorn on 2017-03-14 09:03:14 UTC
@Rhemus did you figure it out by now?
Asked by philwall3 on 2017-10-11 04:55:59 UTC
I am trying to do the same but withan ur10, were you succseful on creating your top-level xacro file?
Asked by sophvk on 2020-01-20 13:52:58 UTC