Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
Amronos and ahcorde authored Dec 2, 2024
1 parent 8297b3d commit 352cd12
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,17 @@ extensible via an additional plugin architecture to allow power users to create
robot hardware interfaces between *ros2_control* and Gazebo.

URDF:

.. code-block:: xml
<gazebo>
<plugin filename="libgz_ros2_control-system.so" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
<parameters>$(find gz_ros2_control_demos)/config/cart_controller.yaml</parameters>
</plugin>
</gazebo>
SDF:

.. code-block:: xml
<plugin filename="libgz_ros2_control-system.so" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
Expand Down Expand Up @@ -165,6 +168,7 @@ or via ROS parameters:
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:

URDF:

.. code-block:: xml
<gazebo>
Expand All @@ -176,9 +180,12 @@ URDF:
</ros>
</plugin>
</gazebo>
SDF:

.. code-block:: xml
<plugin filename="libgz_ros2_control-system.so" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
...
<ros>
Expand Down Expand Up @@ -210,6 +217,7 @@ The respective GazeboSimSystemInterface sub-class is specified in a URDF or SDF
robot model is loaded. For example, the following XML will load the default plugin:

URDF:

.. code-block:: xml
<ros2_control name="GazeboSimSystem" type="system">
Expand All @@ -223,7 +231,9 @@ URDF:
...
</plugin>
</gazebo>
SDF:

.. code-block:: xml
<ros2_control name="GazeboSimSystem" type="system">
Expand All @@ -243,15 +253,18 @@ Use the tag ``<parameters>`` inside ``<plugin>`` to set the YAML file with the c
and use the tag ``<controller_manager_prefix_node_name>`` to set the controller manager node name.

URDF:

.. code-block:: xml
<gazebo>
<plugin name="gz_ros2_control::GazeboSimROS2ControlPlugin" filename="libgz_ros2_control-system">
<parameters>$(find gz_ros2_control_demos)/config/cart_controller.yaml</parameters>
<controller_manager_prefix_node_name>controller_manager</controller_manager_prefix_node_name>
</plugin>
<gazebo>
<gazebo>
SDF:

.. code-block:: xml
<plugin name="gz_ros2_control::GazeboSimROS2ControlPlugin" filename="libgz_ros2_control-system">
Expand All @@ -275,7 +288,7 @@ There are some examples in the *gz_ros2_control_demos* package.
To specify whether to use URDF or SDF, you can launch the demo in the following way (the default is URDF):
.. code-block:: shell
ros2 launch gz_ros2_control_demos ....launch.py description_format:=sdf
ros2 launch gz_ros2_control_demos <launch file> description_format:=sdf
Cart on rail
-----------------------------------------------------------
Expand Down

0 comments on commit 352cd12

Please sign in to comment.