Creating our first URDF file

The robot that we are going to build in the following sections is a mobile robot with four wheels and an arm with a gripper.

To start with, we create the base of the robot with four wheels. Create a new file in the chapter4_tutorials/robot1_description/urdf folder with the name robot1.urdf, and enter the following code:

<?xml version="1.0"?> <robot name="Robot1"> <link name="base_link"> <visual> <geometry> <box size="0.2 .3 .1" /> </geometry> <origin rpy="0 0 0" xyz="0 0 0.05" /> <material name="white"> <color rgba="1 1 1 1" /> </material> </visual> </link> <link name="wheel_1"> <visual> <geometry> <cylinder length="0.05" radius="0.05" /> </geometry> <origin rpy="0 1.5 0" xyz="0.1 0.1 0" /> <material name="black"> <color ...

Get Effective Robotics Programming with ROS - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.