Adding transmission tags to actuate the model

To actuate the robot using ROS controllers, we should define the <transmission> element to link actuators to joints. Here is the macro defined for transmission:

   <xacro:macro name="transmission_block" params="joint_name"> 
    <transmission name="tran1"> 
      <type>transmission_interface/SimpleTransmission</type> 
      <joint name="${joint_name}"> 
                  <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface> 
      </joint> 
      <actuator name="motor1"> 
       <mechanicalReduction>1</mechanicalReduction> 
      </actuator> 
    </transmission> 
   </xacro:macro> 

Here, <joint name = ""> is the joint in which we link the actuators. The <type> element is the type of transmission. Currently, transmission_interface/SimpleTransmission ...

Get Mastering ROS for Robotics Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.