Adding the gazebo_ros_control plugin

After adding the transmission tags, we should add the gazebo_ros_control plugin in the simulation model to parse the transmission tags and assign appropriate hardware interfaces and the control manager. The following code adds the gazebo_ros_control plugin to the xacro file:

  <!-- ros_control plugin --> 
  <gazebo> 
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> 
      <robotNamespace>/seven_dof_arm</robotNamespace> 
    </plugin> 
  </gazebo> 

Here, the <plugin> element specifies the plugin name to be loaded, which is libgazebo_ros_control.so. The <robotNamespace> element can be given as the name of the robot; if we are not specifying the name, it will automatically load the name of the robot from ...

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.