combine/include UR5e + custom gripper xacro files

asked 2022-07-15 14:03:55 -0500

release_Jolly gravatar image

Hello all!

I am not new to ROS but I have never had to edit a robot model before (luckily). I downloaded th UR5e robot files from this repository. In ur_description/urdf I can find a basically 3 main files:

  1. ur5e.xacro
  2. ur5e_macro.xacro
  3. ur_macro

From what is my few knowledge in URDF/xacros etc, the 1st includes the 2nd that includes the 3rd. In this way we can have one file to describe all the UR versions and with the other two we pass the proper parameters base on the robot we choose.

I created a xacro file that describes my gripper (actually just two cilynders) and I would like to have a final modalof the robot that also integrates the gripper. My final goal is to create a moveit package with the UR5e robot + my gripper in order to move the manipulator keeping the collision check plugin.

my xacro file look like this:

<robot <a="" href="http://xmlns:xacro="http://www.ros.org/wiki/xacro%22" name="ur5e_robot">xmlns:xacro="http://www.ros.org/wiki/...> <xacro:macro name="camera_with_gripper" params=""> <joint name="camera_support_joint" type="fixed"> <parent link="tool0"> <child link="camera_support"> <origin rpy="0 0 0" xyz="0 0 0.004"> </origin></child></parent></joint> <link name="camera_support"/> <visual> <geometry> <cylinder length="0.008" radius="0.0865"> </cylinder></geometry> <material name="blue"> <color rgba="0 0 0.8 1"> </color></material> </visual> <collision> <geometry> <cylinder length="0.018" radius="0.0965"> </cylinder></geometry> </collision> <joint name="mygripper_joint" type="fixed"> <parent link="camera_support"> <child link="mygripper"> <origin rpy="0 0 0" xyz="0 0 0.094"> </origin></child></parent></joint> <link name="mygripper"/> <visual> <geometry> <cylinder length="0.18" radius="0.0375"> </cylinder></geometry> </visual> <collision> <geometry> <cylinder length="0.18" radius="0.0375"> </cylinder></geometry> </collision> <joint name="tcp_joint" type="fixed"> <origin rpy="0 0 0" xyz="0 0 0.09"> <parent link="mygripper"> <child link="tcp"> </child></parent></origin></joint> <link name="tcp"/> </xacro:macro> <xacro:camera_with_gripper> </xacro:camera_with_gripper></robot>

edit retag flag offensive close merge delete