Reader small image

You're reading from  Mastering ROS for Robotics Programming

Product typeBook
Published inDec 2015
Reading LevelIntermediate
PublisherPackt
ISBN-139781783551798
Edition1st Edition
Languages
Concepts
Right arrow
Author (1)
Lentin Joseph
Lentin Joseph
author image
Lentin Joseph

Lentin Joseph is an author and robotics entrepreneur from India. He runs a robotics software company called Qbotics Labs in India. He has 7 years of experience in the robotics domain primarily in ROS, OpenCV, and PCL. He has authored four books in ROS, namely, Learning Robotics using Python, Mastering ROS for Robotics Programming, ROS Robotics Projects, and Robot Operating System for Absolute Beginners. He is currently pursuing his master's in Robotics from India and is also doing research at Robotics Institute, CMU, USA.
Read more about Lentin Joseph

Right arrow

Explaining the URDF file


When we check the code, we can add a <robot> tag at the top of the description:

<?xml version="1.0"?>
<robot name="pan_tilt">

The <robot> tag defines the name of the robot that we are going to create. Here, we named the robot pan_tilt.

If we check the sections after the <robot> tag definition, we can see link and joint definitions of the pan and tilt mechanism:

  <link name="base_link">
    <visual>
      <geometry>
      <cylinder length="0.01" radius="0.2"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <material name="yellow">
        <color rgba="1 1 0 1"/>
      </material>
    </visual>
  </link>

The preceding code snippet is the base_link definition of the pan and tilt mechanism. The <visual> tag can describe the visual appearance of the link, which is shown on the robot simulation. We can define the link geometry (cylinder, box, sphere, or mesh...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering ROS for Robotics Programming
Published in: Dec 2015Publisher: PacktISBN-13: 9781783551798

Author (1)

author image
Lentin Joseph

Lentin Joseph is an author and robotics entrepreneur from India. He runs a robotics software company called Qbotics Labs in India. He has 7 years of experience in the robotics domain primarily in ROS, OpenCV, and PCL. He has authored four books in ROS, namely, Learning Robotics using Python, Mastering ROS for Robotics Programming, ROS Robotics Projects, and Robot Operating System for Absolute Beginners. He is currently pursuing his master's in Robotics from India and is also doing research at Robotics Institute, CMU, USA.
Read more about Lentin Joseph