Arm does not appear when using xacro to attach UR5 to Robotiq Gripper
I am trying to attach a Robotiq 2f gripper to a UR5 arm, but cannot get the two components to properly connect to one another. Following the tutorial here, I created the xacro file below, but only the gripper appears when I launch the MoveIt Setup Assistant and load the xacro. I don't see any errors.
How do I properly attach the gripper to the arm for simulation?
<?xml version="1.0"?>
<robot name="ur5_robotiq" xmlns:xacro="http://wiki.ros.org/xacro">
<!-- include macros for UR5 and the 2f gripper -->
<xacro:include filename="$(find ur_description)/urdf/ur5.urdf.xacro" />
<xacro:include filename="$(find robotiq_2f_140_gripper_visualization)/urdf/robotiq_arg2f_140_model.xacro" />
<!-- create the robot + eef combo itself as a macro -->
<xacro:macro name="ee_robot" params="prefix">
<!-- instantiate UR5 and 2f gripper -->
<xacro:ur5_robot prefix="${prefix}robot_" joint_limited="true"/>
<xacro:robotiq_arg2f_140 prefix="${prefix}gripper_" />
<!-- attach gripper -->
<joint name="${prefix}robot_tool0-${prefix}gripper_robotiq_arg2f_base_link" type="fixed">
<origin xyz="0 0 0" rpy="${pi/2} -${pi/2} 0" />
<parent link="${prefix}robot_tool0" />
<child link="${prefix}gripper_robotiq_arg2f_base_link" />
</joint>
</xacro:macro>
</robot>
I have cloned the most recent industrial packages for Universal Robots and Robotiq and am running Ubuntu 18.04.
Can you please check whether you're running into ros/urdfdom_headers#41?
Also: if you don't create the joint, nor instantiate the
robotiq_arg2f_140
macro, does the robot model appear?I don't think the urdfdom_headers issue is the problem here, and I've tried changing the
pi/2
values to0
with no effect. Also, yes the robot model appears if I remove the joint and therobotiq_arg2f_140
.Also, I added
<xacro:ee_robot prefix=""/>
below the macro to create the arm + gripper combo, and the resulting error is now as follows:[ERROR] [1544424525.498517311]: Failed to find root link: Two root links found: [robot_base_link] and [robotiq_arg2f_base_link]
I was able to fix arm not showing up by using
robotiq_arg2f_140_model_macro.xacro
instead ofrobotiq_arg2f_140_model.xacro
. However, the planning group forgripper
only shows 1 of the 8 gripper finger joints. I don't know if this is a related issue or if I should create a new question for tAh:
re: planning group: did you create that yourself?
In any case: yes, that would be a new question.
Finally: please post how you resolved this as an answer and accept your own answer.
Thanks. I've already posted the answer, but I don't have enough reputation to accept it yet.
I was trying to create the planning group in the MoveIt Setup Assistant.