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

I'd highly recommend reading through the URDF tutorials to understand better what is inside a URDF or xacro file.

In this case, as the robot has been mostly defined already, and you just need to add the tool, you will want to add a link. You can either do this directly in the rbkairos.urdf.xacro, as a child of the <robot> tag, or you can define the tool in a separate xacro file (e.g. my_tool.xacro) and include it, as is done here. The latter is probably the cleaner approach but they are functionally equivelent. includeing an xacro file just inserts it into the final parsed file.

Your '<link>' will need the following

  • <visual> and <collision> tags. These can have identical contents if you want to use the same .stl file for both. Sometimes it makes more sense to use simplified collision models, but this depends on your application/models. The end of this tutorial shows you what your visual tag will need to import a mesh model
  • a <joint> definition; the joint defines just how and where your .stl model fits onto the robot? is it a fixed connection, can it rotate, if so how?
  • if you are simulating your robot, you will also need an <inertial> block for the sake of the physics engine

You can quickly to test to make sure your .xacro file compiles properly using the commandline interface (e.g. xacro myfile.xacro). Feel free to update your question with your attempt if you have issues, and I can try to help