Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Demos for SDF #427

Merged
merged 10 commits into from
Dec 4, 2024
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:
Amronos marked this conversation as resolved.
Show resolved Hide resolved

.. 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>
Amronos marked this conversation as resolved.
Show resolved Hide resolved

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
Loading