Defining actuators

Now, we need to define the actuator information for our robot wheels in the robot_base_essentials.xacro file:

<xacro:macro name="base_transmission" params="prefix ">
<transmission name="${prefix}_wheel_trans" type="SimpleTransmission">
<type>transmission_interface/SimpleTransmission</type>
<actuator name="${prefix}_wheel_motor">
<hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>

<joint name="${prefix}_wheel_joint">
<hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
</joint>
</transmission>
</xacro:macro>

Let's call them in our robot file as macros:

<xacro:base_transmission prefix="front_left"/>
<xacro:base_transmission prefix="front_right"/>
<xacro:base_transmission prefix="rear_left"/>
<xacro:base_transmission prefix="rear_right"/>

Now that the mechanisms have been called, let's call the controllers that use them and make our robot dynamic.

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

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