Skip to content

Commit

Permalink
Simplify access for robot description from CM by overriding RM (ros-c…
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich authored Jul 8, 2024
1 parent 06da0b0 commit 6ebb2e7
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 195 deletions.
27 changes: 18 additions & 9 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,22 +197,31 @@ robot hardware interfaces between *ros2_control* and Gazebo Classic.
.. code-block:: xml
<gazebo>
<plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
<robot_param>robot_description</robot_param>
<robot_param_node>robot_state_publisher</robot_param_node>
<parameters>$(find gazebo_ros2_control_demos)/config/cart_controller.yaml</parameters>
<controller_manager_name>simulation_controller_manager</controller_manager_name>
</plugin>
<plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
<parameters>$(find gazebo_ros2_control_demos)/config/cart_controller.yaml</parameters>
</plugin>
</gazebo>
The *gazebo_ros2_control* ``<plugin>`` tag also has the following optional child elements:

* ``<robot_param>``: The location of the ``robot_description`` (URDF) on the parameter server, defaults to ``robot_description``
* ``<robot_param_node>``: Name of the node where the ``robot_param`` is located, defaults to ``robot_state_publisher``
* ``<parameters>``: YAML file with the configuration of the controllers
* ``<parameters>``: A YAML file with the configuration of the controllers. This element can be given multiple times to load multiple files.
* ``<hold_joints>``: if set to true (default), it will hold the joints' position if their interface was not claimed, e.g., the controller hasn't been activated yet.
* ``<controller_manager_name>``: Set controller manager name (default: ``controller_manager``)

Additionally, one can specify a namespace and remapping rules, which will be forwarded to the controller_manager and loaded controllers. Add the following ``<ros>`` section:

.. code-block:: xml
<gazebo>
<plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
...
<ros>
<namespace>my_namespace</namespace>
<remapping>/robot_description:=/robot_description_full</remapping>
</ros>
</plugin>
</gazebo>
Default gazebo_ros2_control Behavior
-----------------------------------------------------------

Expand Down
Loading

0 comments on commit 6ebb2e7

Please sign in to comment.