O'Reilly logo

Learning ROS for Robotics Programming by Enrique Fernández, Aaron Martinez

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, which 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 robots with four wheels. Create a new file in the chapter5_tutorials/urdf folder with the name robot1.urdf and put in the following code; this URDF code is based on XML, and the indentation is not mandatory but advisable, so use an editor that supports it or an adequate plugin or configuration (for example, an appropriate .vimrc file in Vim):

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

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