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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.