ROS2 Tutorial: Simple Gripper

URDF Description

File arm.urdf.xacro contains links to the files that actually do the job. In addition to what we had in a previous section, it includes the xacro file for a gripper (before it only included xacro file for a robotic arm) and a joint to connect this gripper to the arm.

                    
                


The gripper itself is implemented in gripA.xacro file.

                    
                

This is a standard beginning of an URDF file. Note that I am calling the model armA, while the project is arm_01. Same armA can be further enchanced in arm_02 and so on.

Now, we have two symmetric fingers, they mirror each other's moves. Defining parameters for these fingers twice is error prone, so we use variables. The only difference between fingers is the mesh (STL file) they use and the fact that their X coordinates have opposite sign, as fingers move in an opposite directions:

                    
                

Gripper's "base" link:

                    
                

Note that collision and inertial geometry here is NOT final, francly, it is a complete garbage. As I mentioned, I am going to address it in one of the future sections. So for now, look at "visual" tag only.

Next, we have two links for fingers and two prismatic joints (linear actuators):

                    
                

Note the use of a mimic tag that allows us to make sure fingers move in sync (but in the opposite directions).

The last part of a gripA.xacro file specifies which Gazebo color corresponds to which link. Obviously, it is a good idea to make sure Gazebo colors correspond to RViz ones.

                    
                

(C) snowcron.com, all rights reserved

Please read the disclaimer