Skip to content

Commit 4d7e0ea

Browse files
Use new ros2controlcli verb
1 parent 54b02db commit 4d7e0ea

File tree

1 file changed

+16
-26
lines changed

1 file changed

+16
-26
lines changed

example_13/doc/userdoc.rst

+16-26
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,13 @@ Tutorial steps
194194
threedofbot_position_controller[forward_command_controller/ForwardCommandController] inactive
195195
196196
197-
2. Activate ``RRBotWithSensor`` and its position controller. Call
197+
2. Activate ``RRBotWithSensor`` hardware component. Use either the ros2controlcli
198+
199+
.. code-block:: shell
200+
201+
ros2 control set_hardware_component_state RRBotSystemWithSensor active
202+
203+
or call the service manually
198204

199205
.. code-block:: shell
200206
@@ -203,6 +209,11 @@ Tutorial steps
203209
target_state:
204210
id: 0
205211
label: active"
212+
213+
Then activate its position controller via
214+
215+
.. code-block:: shell
216+
206217
ros2 control switch_controllers --activate rrbot_with_sensor_position_controller
207218
208219
Scenario state:
@@ -248,11 +259,7 @@ Tutorial steps
248259

249260
.. code-block:: shell
250261
251-
ros2 service call /controller_manager/set_hardware_component_state controller_manager_msgs/srv/SetHardwareComponentState "
252-
name: FakeThreeDofBot
253-
target_state:
254-
id: 0
255-
label: inactive"
262+
ros2 control set_hardware_component_state FakeThreeDofBot inactive
256263
ros2 control switch_controllers --activate threedofbot_joint_state_broadcaster threedofbot_pid_gain_controller
257264
258265
Scenario state:
@@ -326,11 +333,7 @@ Tutorial steps
326333

327334
.. code-block:: shell
328335
329-
ros2 service call /controller_manager/set_hardware_component_state controller_manager_msgs/srv/SetHardwareComponentState "
330-
name: FakeThreeDofBot
331-
target_state:
332-
id: 0
333-
label: active"
336+
ros2 control set_hardware_component_state FakeThreeDofBot active
334337
ros2 control switch_controllers --activate threedofbot_position_controller
335338
336339
Scenario state:
@@ -380,11 +383,7 @@ Tutorial steps
380383
.. code-block:: shell
381384
382385
ros2 control switch_controllers --deactivate rrbot_position_controller
383-
ros2 service call /controller_manager/set_hardware_component_state controller_manager_msgs/srv/SetHardwareComponentState "
384-
name: RRBotSystemPositionOnly
385-
target_state:
386-
id: 0
387-
label: inactive"
386+
ros2 control set_hardware_component_state RRBotSystemPositionOnly inactive
388387
389388
Scenario state:
390389

@@ -430,16 +429,7 @@ Tutorial steps
430429
.. code-block:: shell
431430
432431
ros2 control switch_controllers --deactivate rrbot_joint_state_broadcaster joint_state_broadcaster
433-
ros2 service call /controller_manager/set_hardware_component_state controller_manager_msgs/srv/SetHardwareComponentState "
434-
name: RRBotSystemPositionOnly
435-
target_state:
436-
id: 0
437-
label: unconfigured"
438-
ros2 service call /controller_manager/set_hardware_component_state controller_manager_msgs/srv/SetHardwareComponentState "
439-
name: RRBotSystemPositionOnly
440-
target_state:
441-
id: 0
442-
label: finalized"
432+
ros2 control set_hardware_component_state RRBotSystemPositionOnly unconfigured
443433
ros2 control switch_controllers --activate joint_state_broadcaster
444434
445435
Scenario state (everything is broken during ``joint_state_broadcaster`` restart):

0 commit comments

Comments
 (0)