Skip to content

Commit c122455

Browse files
authored
[Docs] Fix information about activation and deactivation of chainable controllers (ros-controls#1104)
1 parent 33e77b8 commit c122455

File tree

1 file changed

+5
-39
lines changed

1 file changed

+5
-39
lines changed

controller_manager/doc/controller_chaining.rst

+5-39
Original file line numberDiff line numberDiff line change
@@ -63,48 +63,14 @@ After configuring a chainable controller, controller manager calls ``input_inter
6363
This is the same process as done by ``ResourceManager`` and hardware interfaces.
6464
Controller manager maintains "claimed" status of interface in a vector (the same as done in ``ResourceManager``).
6565

66+
6667
Activation and Deactivation Chained Controllers
6768
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6869

69-
Controller Manager has an additional parameter that describes how controllers are chained.
70-
In the first version, the parameter-structure would have some semantic meaning embedded into it, as follows:
71-
72-
73-
.. code-block:: yaml
74-
75-
controller_manager:
76-
ros__parameters:
77-
chained_controllers:
78-
79-
- parallel_group_1:
80-
- controller1_1
81-
- controller1_2
82-
83-
- parallel_group_2:
84-
- controller2_1
85-
86-
- parallel_group_3:
87-
- controller3_1
88-
- controller3_2
89-
- controller3_3
90-
91-
...
92-
93-
- parallel_group_N:
94-
- controllerN_1
95-
- ...
96-
- controllerN_M
97-
98-
99-
100-
This structure is motivated by ``filter_chain`` structure from `ros/filters repository <https://github.com/ros/filters/tree/ros2>`__, see `this file for implementation <https://github.com/ros/filters/blob/ros2/include/filters/filter_chain.hpp>`__.
101-
102-
This structure is stored internally by controller manager into an ordered map (``std::map<std::string, std::vector<std::string>>``) with group name as key.
103-
When a controller should be deactivated, the controller manager deactivates all the controllers in the preceding groups first.
104-
All other controllers from the group stay active, as well as all controllers in the following groups.
105-
NOTE: In the future this could be done more intelligently, i.e., deactivate only controllers in the preceding groups that actually precede the controller that should be deactivated.
106-
107-
On the other hand, the controller should be manually activated in the reverse order, i.e., from the those closer to the hardware toward those preceding them.
70+
Chained controllers must be activated and deactivated together or in the proper order.
71+
This means you must first activate all following controllers to have the preceding one activated.
72+
For the deactivation there is the inverse rule - all preceding controllers have to be deactivated before the following controller is deactivated.
73+
One can also think of it as an actual chain, you can not add a chain link or break the chain in the middle.
10874

10975

11076
Debugging outputs

0 commit comments

Comments
 (0)