O'Reilly logo

Robot Operating System Cookbook by Kumar Bipin

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

How to do it…

We will complete the URDF file to introduce the robot model in Gazebo by defining a few more elements there. However, we will be using the .xacro file which is more complex, but more powerful for development. We can find the file with all its modifications at chapter6_tutorials/robot_description/urdf/robot_gazebo.xacro on GitHub (https://github.com/kbipin/Robot-Operating-System-Cookbook):

<link name="base_link"> 
               <visual> 
               <geometry> 
                           <box size="0.2 .3 .1"/> 
                     </geometry> 
               <origin rpy="0 0 1.54" xyz="0 0 0.05"/> 
               <material name="white"> 
                     <color rgba="1 1 1 1"/> 
               </material> 
               </visual> 
         <collision> 
               <geometry> 
                           <box size="0.2 .3 0.1"/> 
               </geometry> 
         </collision> 
         <xacro:default_inertial mass="10"/> 
</link> 

You may have noticed in the preceding ...

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