March 2018
Intermediate to advanced
1396 pages
42h 14m
English
We define macros in this code to avoid repeatability and to make the code shorter. Here are the macros we have used in this code:
<xacro:macro name="inertial_matrix" params="mass">
<inertial>
<mass value="${mass}" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="0.5" iyz="0.0" izz="1.0" />
</inertial>
</xacro:macro>
This is the definition of the inertial matrix macro in which we can use mass as its parameter:
<xacro:macro name="transmission_block" params="joint_name"> <transmission name="tran1"> <type>transmission_interface/SimpleTransmission</type> <joint name="${joint_name}"> <hardwareInterface>PositionJointInterface</hardwareInterface> </joint> <actuator name="motor1"> <hardwareInterface>PositionJointInterface</hardwareInterface> ...