There's moreā€¦

3D modeling software such as SketchUp or Blender can be used to generate mesh designs for the 3D model, which can be exported in either *.dae or *.sdf format. We can create a URDF file and view the model on RViz. However, the detailed process for developing the mesh design for a 3D model using modeling software is beyond the scope of this book, but an advanced reader can find the resources on the web.

Nevertheless, we have the file named bot.dae in the robot_description/meshes folder at GitHub, which is a basic mesh design of the mobile robot model for demonstration purposes.

Hence, we will learn how to use the mesh design of a 3D model using the URDF file. Therefore, we will create a new file in the robot_description/urdf folder with the name dae.urdf, and we will add the following code to it (refer to the robot_description/urdf/dae.urdf package at GitHub):

<?xml version="1.0"?> 
<robot name="robot"> 
  <link name="base_link"> 
    <visual> 
      <geometry> 
        <mesh scale="1 1 1" filename="package://robot_description/meshes/bot.dae"/> 
      </geometry> 
      <origin xyz="0 0 0.226"/> 
    </visual> 
  </link> 
</robot> 

The model can be exported to one file only, and so the wheels and chassis base are part of the same object. In order to develop a robot model with mobile parts, each part must be exported to a separate file.

We can verify the model by using the following command:

$ roslaunch robot_description simulation.launch model:="'rospack find robot_description'/urdf/dae.urdf"

As a result, we will get the following output:

Mesh design
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.51.117