From 56004a1356de1a6c13b4a0da61cfda42c868d32f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 3 Nov 2024 10:33:42 +0100 Subject: [PATCH 1/2] Fix test after JSB got fixed (#620) (#621) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit b7b38447f2e272c49b91f2b8dc27ff81b3ddc02a) Co-authored-by: Christoph Fröhlich --- example_13/test/test_three_robots_launch.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/example_13/test/test_three_robots_launch.py b/example_13/test/test_three_robots_launch.py index 8f7460993..95d75b86b 100644 --- a/example_13/test/test_three_robots_launch.py +++ b/example_13/test/test_three_robots_launch.py @@ -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", From dcc67fefb6440c822b046a317a0d757e9b6a91ca Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 3 Nov 2024 20:11:30 +0100 Subject: [PATCH 2/2] Example3: Add section on command mode switching (#624) (#625) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add section on command mode switching * Update example_3/doc/userdoc.rst Co-authored-by: Sai Kishor Kothakota --------- Co-authored-by: Sai Kishor Kothakota (cherry picked from commit 1b6c0f111704bbc279bc04c468ad01d8496afdc6) Co-authored-by: Christoph Fröhlich --- example_3/doc/userdoc.rst | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/example_3/doc/userdoc.rst b/example_3/doc/userdoc.rst index dbdbdf908..65a4745d0 100644 --- a/example_3/doc/userdoc.rst +++ b/example_3/doc/userdoc.rst @@ -140,7 +140,30 @@ Tutorial steps [RRBotSystemMultiInterfaceHardware]: Got pos: 0.78500, vel: 0.00000, acc: 0.00000 for joint 0! [RRBotSystemMultiInterfaceHardware]: Got pos: 0.78500, vel: 0.00000, acc: 0.00000 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``