Defining collisions

To visualize the robot in Gazebo, we need to add the <collision> tags, along with the <visual> tags defined in the <link> tag, as follows:

<collision>
<origin
xyz="0 0 0"
rpy="1.5707963267949 0 3.14" />
<geometry>
<mesh filename="package://robot_description/meshes/robot_base.stl" />
</geometry>
</collision>

For the base, add them to the robot_base.urdf.xacro file since we defined base_link there.

For all the wheel links, add them to the robot_essentials.xacro file since we defined the wheel link there:

<collision>
<origin
xyz="0 0 0"
rpy="1.5707963267949 0 0" />
<geometry>
<mesh filename="package://robot_description/meshes/wheel.stl" />
</geometry>
</collision>

Since Gazebo is a physics simulator, we define the physical properties using the <inertial> tags. We can acquire the mass and inertial properties from this third-party software. The inertial properties that are acquired from this software are added inside the <link> tag, along with suitable tags, as indicated here:

  • For the base, the following is added:
<inertial>
<origin
xyz="0.0030946 4.78250032638821E-11 0.053305"
rpy="0 0 0" />
<mass value="47.873" />
<inertia
ixx="0.774276574699151"
ixy="-1.03781944357671E-10"
ixz="0.00763014265820928"
iyy="1.64933255189991"
iyz="1.09578155845563E-12"
izz="2.1239326987473" />
</inertial>
  • For all of the wheels, the following is added:
<inertial>
<origin
xyz="-4.1867E-18 0.0068085 -1.65658661799998E-18"
rpy="0 0 0" />
<mass value="2.6578" />
<inertial>
ixx="0.00856502765719703"
ixy="1.5074118157338E-19"
ixz="-4.78150098725052E-19"
iyy="0.013670640432096"
iyz="-2.68136447099727E-19"
izz="0.00856502765719703" />
</inertial>

Now that the Gazebo properties have been created, let's create the mechanisms.

..................Content has been hidden....................

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