URDF Format - umigv/simulation_stack GitHub Wiki
URDF Basics
Unified Robotics Description Format (URDF) is an XML specification used to model robots. It is made up of links (parts of robot) and joints (connection between links). The file describes the following information:
- Robot Structure: This includes links, joints, and their hierarchical relationships, defining the robot's physical structure.
- Visual and Collision Geometry: Descriptions of the visual appearance (for visualization) and collision geometries (for collision detection)
- Joint Properties: Characteristics of the joints connecting the links, such as type (e.g., revolute, fixed), limits, and dynamics.
- Inertial Properties: Mass, moments of inertia, and center of mass for each link, used in dynamics calculations.
You can imagine the model structure to be a tree with links as nodes and joints as edges. The root, or fixed frame is the core of the model. All other links are defined relative to the fixed frame.
Sources to learn more about URDF
The official URDF tutorial can be found here. To create reusable URDF blocks, we use xacro, or xml macros. You can read more about it here
You can also check out this and this video by Articulated Robotics which goes through setting up URDF files. The entire channel is a goldmine for learning ROS and I will recommend referring to the channel when you want to learn anything new.
Of course, the best way to learn to set up URDF files for the team will be to look at how our past robots are set up. Marvin_simulation includes a great example for this.
URDF Conventions
The following links have special meanings as per REP105
- base_link is connected to the robot and acts as the parent link. It
- base_footprint is the projection of the base_link onto the x-y plane. It is meant to consistently be on floor plane so that SLAM can be done in 2D.
- odom is the origin of the world
Special rules
Here are some special rules associated with URDF files
- To run the URDF in Gazebo, the root link can not have any inertial property defined with it. Instead, create a child link with all the inertial properties instead. This is why in the URDF file, the base link is an empty link and the chassis is defined in a separate link.
- If you have a link with multiple visuals and want to give them all a color in Gazebo. Do not name the individual visuals. This is a bug with Gazebo.