ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I think you are looking for the Gazebo ROS plugin (Model Plugin to be exact):
Adding a ModelPlugin
In short, the
ModelPlugin
is inserted in the URDF inside the<robot>
element. It is wrapped with the<gazebo>
pill, to indicate information passed to Gazebo. For example:<robot> ... robot description ... <gazebo> <plugin name="differential_drive_controller"
filename="libdiffdrive_plugin.so"> ... plugin parameters ... </plugin> </gazebo> ... robot description ... </robot>
Upon loading the robot model within Gazebo, the
diffdrive_plugin
code will be given a reference to the model itself, allowing it to manipulate it. Also, it will be give a reference to the SDF element of itself, in order to read the plugin parameters passed to it.
2 | No.2 Revision |
I think you are looking for the Gazebo ROS plugin (Model Plugin to be exact):
Adding a ModelPlugin
In short, the
ModelPlugin
is inserted in the URDF inside the<robot>
element. It is wrapped with the<gazebo>
pill, to indicate information passed to Gazebo. For example:<robot> ... robot description ... <gazebo> <plugin name="differential_drive_controller"
filename="libdiffdrive_plugin.so">
</robot>... plugin parameters ...</plugin></gazebo>... robot description ...</robot>Upon loading the robot model within Gazebo, the
diffdrive_plugin
code will be given a reference to the model itself, allowing it to manipulate it. Also, it will be give a reference to the SDF element of itself, in order to read the plugin parameters passed to it.