For the purposes of gazebo_ros_control in its current implementation, the only important information in these transmission tags are:
<joint name="">
- the name must correspond to a joint else where in your URDF<type>
- the type of transmission. Currently only "transmission_interface/SimpleTransmission" is implemented. (feel free to add more)<hardwareInterface>
- within the
tag, this tells the gazebo_ros_control plugin what hardware interface to load (position, velocity or effort interfaces). Currently only effort interfaces are implemented. (feel free to add more)
<actuator>
The rest of the names and elements are currently ignored.
==============================
In addition to the transmission tags, a Gazebo plugin needs to be added to your URDF that actually parses the transmission tags and loads the appropriate hardware interfaces and controller manager.By default the gazebo_ros_control plugin is very simple,
though it is also extensible via an additional plugin architecture to allow power users to create their own custom robot hardware interfaces between ros_control and Gazebo.
The default plugin XML should be added to your URDF:
<gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotNamespace>/MYROBOT</robotNamespace> </plugin> </gazebo>
The gazebo_ros_control <plugin>
tag also has the following optional child elements:
<robotNamespace>
: The ROS namespace to be used for this instance of the plugin, defaults to robot name in URDF/SDF<controlPeriod>
: The period of the controller update (in seconds), defaults to Gazebo‘s period<robotParam>
: The location of the robot_description (URDF) on the parameter server, defaults to ‘/robot_description‘<robotSimType>
: The pluginlib name of a custom robot sim interface to be used (see below for more details), defaults to ‘DefaultRobotHWSim‘
RRBot Example
rrbot.xacro
<transmission name="tran1"> <type>transmission_interface/SimpleTransmission</type> <joint name="joint1"/> <actuator name="motor1"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="tran2"> <type>transmission_interface/SimpleTransmission</type> <joint name="joint2"/> <actuator name="motor2"> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission>
rrbot.gazebo
<gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotNamespace>/rrbot</robotNamespace> </plugin> </gazebo>