# URDF ## What is a URDF A **URDF (Unified Robot Description Format)** in ROS 2 is an XML file format used to describe a robot's structure. It defines the robot's physical properties, such as its links (rigid parts), joints (connections), dimensions, and more. URDFs are crucial for simulation, visualization, and robot control as they provide the framework for tools like RViz and Gazebo to understand the robot's design. here is a sample: ```xml title="my_robot.udrf" linenums="1" ``` ### Materials Materials allow color and other information to be added to a `` ```xml ``` ### Links **Links** are fundamental building blocks in a URDF file that represent the robot's physical parts. They allow you to create the individual parts of the robot and they are made up of multiple parts. #### Visual 1. **`origin`**: - Specifies the position and orientation of the visual geometry relative to the link's frame. - Example: ``. 2. **`geometry`**: - Describes the shape of the link. Shapes can be: - **Box**: `` specifies dimensions. - **Cylinder**: ``. - **Sphere**: ``. - **Mesh**: `` for complex shapes. 3. **`material`**: - Specifies the color or texture of the link. - **Color**: `` uses RGBA values (alpha for transparency). - **Texture**: `` for applying an image. ```xml ``` ### Joints Joints are what old different objects together. There are many different types of joints as shown below. There are also different parts to a joint. The `` link tells the join what it is attached to while the `` link tells it what its child is. The `` section tells the joint where it is located with the `xyz`being the coordinates and the `rpy` being role, pitch, and yaw. The `` section indicates a 1 for allowed moment and a 0 for no movement. Finally the `` section gives a lower and upper bound. #### revolute A hinge joint that rotates along the axis and has a limited range specified by the upper and lower limits that are in radians. ```xml ``` #### continuous A continuous hinge joint that rotates around the axis and has no upper and lower limits. ```xml ``` #### prismatic A sliding joint that slides along the axis, and has a limited range specified by the upper and lower limits in meters. ```xml ``` #### fixed This is not really a joint because it cannot move. All degrees of freedom are locked. This type of joint does not require the ``, ``, ``, `` or ``. ```xml ``` #### floating This joint allows motion for all 6 degrees of freedom. ```xml ``` #### planar This joint allows motion in a plane perpendicular to the axis. ```xml ``` ## Links For Help Here are some links for help. - [ROS.org](https://wiki.ros.org/urdf/XML)