Search code examples
rosmoveitrvizurdf

How would I modify this URDF to make include the gripper arm?


I have this robot arm which came with a URDF file and some STL files. The URDF file includes all of the revolute joints but it does not include a joint for the gripper.

Image of robot in RViz

I'm trying to figure out how to add the gripper to the URDF so I can simulate it, but I am having a tough time since I've never done this before.

The last link/joint of the URDF look like this:

<link name="link5">
        <visual>
            <origin
                    xyz="0 0 -0.11"
                    rpy="0 0 0"/>
            <geometry>
                <mesh
                        filename="package://dofbot_info/meshes/link5.STL"/>
            </geometry>
            <material
                    name="">
                <color
                        rgba="1 1 1 1"/>
            </material>
        </visual>
        <collision>
            <origin
                    xyz="0 0 0"
                    rpy="0 0 0"/>
            <geometry>
                <mesh
                        filename="package://dofbot_info/meshes/link5.STL"/>
            </geometry>
        </collision>
    </link>
    <joint name="joint5" type="revolute">
        <origin
                xyz="-0.18385 -0.00215 -0.000605"
                rpy="0 -1.5708 0"/>
        <parent
                link="link4"/>
        <child
                link="link5"/>
        <axis
                xyz="0 0 1"/>
        <limit
                lower="-1.5708"
                upper="3.1416"
                effort="100"
                velocity="1"/>
    </joint>

If I want this gripper to open and close in RViz, could I do so with the current mesh/STL? If not, how would I re-build a moveable gripper with basic shapes like rectangles in the URDF?

Here is a closeup link-5 stl: link-5 front

Link-5 back


Solution

  • As I wrote in the comments, here is a way to create a simplified model, from that you would need to create a ROS Node to publish the joint_states in a way that would mimic the motion of your gripper

    EDIT: Seems that someone has already done it for you