ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The fix for this was to add <xacro:ee_robot prefix=""/> after the macro for the gripper attachment, and to use robotiq_arg2f_140_model_macro.xacro instead of robotiq_arg2f_140_model.xacro. The working macro looks like this:

<?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_macro.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>
<xacro:ee_robot prefix=""/>
</robot>