Skip to content

Commit

Permalink
Merge branch 'humble' into backport/humble/543
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich authored Nov 13, 2024
2 parents f32b440 + dcc67fe commit 1e58376
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
2 changes: 0 additions & 2 deletions example_13/test/test_three_robots_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,7 @@ def test_behavior(self, proc_output):
"/joint_states",
[
"rrbot_with_sensor_joint1",
"rrbot_joint1",
"rrbot_with_sensor_joint2",
"rrbot_joint2",
"threedofbot_joint1",
"threedofbot_joint2",
"threedofbot_joint3",
Expand Down
25 changes: 24 additions & 1 deletion example_3/doc/userdoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,30 @@ Tutorial steps
[ros2_control_node-1] pos: 0.67, vel: 5.00, acc: 0.00 for joint 0
[ros2_control_node-1] pos: 0.67, vel: 5.00, acc: 0.00 for joint 1
6. To demonstrate illegal controller configuration, use one of the following launch file arguments:
6. Now you can also switch controllers during runtime, which also changes the command mode automatically. First, you have to load the new controller, for example the ``forward_position_controller`` if you haven't changed the launch file argument.

.. code-block:: shell
ros2 control load_controller forward_position_controller $(ros2 pkg prefix ros2_control_demo_example_3 --share)/config/rrbot_multi_interface_forward_controllers.yaml
ros2 control set_controller_state forward_position_controller inactive
Then you can switch controllers using the following command:

.. code-block:: shell
ros2 control switch_controllers --deactivate forward_velocity_controller --activate forward_position_controller
Observe the output of the following CLI commands, and see how the command interfaces are claimed by the new controller.

.. code-block:: shell
ros2 control list_controllers
ros2 control list_hardware_interfaces
Try now to send commands to the new controller, as described in the previous step.


7. To demonstrate illegal controller configuration, use one of the following launch file arguments:

* ``robot_controller:=forward_illegal1_controller`` or
* ``robot_controller:=forward_illegal2_controller``
Expand Down

0 comments on commit 1e58376

Please sign in to comment.