Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Dec 21, 2024
1 parent 8efe9a2 commit c6a2b83
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,12 @@ It is possible to directly define the namespace in the URDF file, as shown below
Where ``r1`` is the namespace associated to the particular instance of the plugin. Please note that the remapping of ``/tf`` and ``/tf_static`` is recommended only if you want to have a separate TF buffer for each namespace, e.g ``/r1/tf``

As an example, run the following command to launch the diff_drive example within the namespace ``r1``

.. code-block:: bash
ros2 launch gazebo_ros2_control_demos diff_drive_namespaced.launch.py
A second method to launch an instance with a particular namespace is by using the Gazebo ``spawn_entity.py`` tool and setting the ``-robot_namespace`` parameter to the script:

.. code-block:: bash
Expand All @@ -337,6 +343,16 @@ The script calls the ``spawn_entity`` service to spawn an entity named ``robot_1

The ``spawn_entity.py`` script will rewrite the robot description to include a namespace for every plugin tag. Please note that this method will apply a namespace to every plugin in the robot description. It will also overwrite any existing namespaces set in the description file.

As an example, run the following command to spawn two diff_drive robots in the namespaces ``r1`` and ``r2``

.. note::

The ros2_control settings for the controller_manager and the controller defined in ``diff_drive_controller_namespaced.yaml`` use wildcards to match both namespaces.

.. code-block:: bash
ros2 launch gazebo_ros2_control_demos diff_drive_pair_namespaced.launch.py
gazebo_ros2_control_demos
==========================================

Expand Down

0 comments on commit c6a2b83

Please sign in to comment.