O'Reilly logo

Effective Robotics Programming with ROS - Third Edition by Aaron Martinez, Enrique Fernández, Luis Sánchez, Anil Mahtani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required