Defining the links

Now, since you're defining the robot model by parts, copy the following code into the <robot> tags (that is, the space between the <robot> tags). Note that we'll define all of the five links directly since they contain coordinate information. Let's look at one of them in detail, the arm base:

<link name="arm_base">
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh filename="package://robot_description/meshes/arm_base.stl" />
</geometry>
<material
name="">
<color
rgba="0.79216 0.81961 0.93333 1" />
</material>
</visual>
</link>

You could find the other links such as bicep, bottom_wrist, elbow, and top_wrist, that have been defined in this file in this book's GitHub repository: https://github.com/PacktPublishing/ROS-Robotics-Projects-SecondEdition/blob/master/chapter_3_ws/src/robot_description/urdf/robot_arm.urdf.xacro.

You could try their  more macros for <visual> and <collision> tags with respective parameter definitions, but this sometimes might lead to confusion for beginners. Hence, to keep it simple, we're only defining minimal macros in this book. If you feel you have mastered macros, you are welcome to test your skills by adding more macros.

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

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