You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _docs/concepts/client_library/execution_management/index.md
+28-23Lines changed: 28 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -266,48 +266,55 @@ The rclc Executor supports all event types as the default ROS 2 Executor, which
266
266
- actions
267
267
- lifecycle
268
268
269
+
#### Sequential execution
270
+
271
+
- At configuration, the user defines the order of handles.
272
+
- At configuration, the user defines whether the handle shall be called only when new data is available (ON_NEW_DATA) or whether the callback shall always be called (ALWAYS).
273
+
- At runtime, all handles are processed in the user-defined order
274
+
- if the configuration of handle is ON_NEW_DATA, then the corresponding callback is only called if new data is available
275
+
- if the configuration of the handle is ALWAYS, then the corresponding callback is always. If no data is available, then the callback is called with no data (e.g. NULL pointer).
276
+
277
+
Figure 9 shows three callbacks, A, B and C. Assume, they shall be executed in the order *B,A,C*. Then the user adds the callbacks to the rclc Executor in this order. Whenever new messages have arrived then the callbacks for which a new message is availabe will be always executed in the user-defined processing order.
- Given a set of handles, a trigger condition, which is based on the availability of input data of these handles, decides when the processing of all callbacks starts.
272
286
273
287
- Available options:
274
288
- ALL operation: fires when input data is available for all handles
275
-
- ANY operation: fires when input data is available for at least one handle
289
+
- ANY operation: fires when input data is available for at least one handle (OR semantics)
276
290
- ONE: fires when input data for a user-specified handle is available
277
-
- User-defined function: user can implement more sophisticated logic
291
+
- User-defined function: user can implement custom logic
278
292
293
+
Figure 10 shows an example of the ALL semantics. Only if all messages *msg_A, msg_B, msg_C* were received, then trigger condition is fullfilled and the callbacks are processed in a user-defined order.
Figure 11 shows an example of the ANY semantics. Thas is, if any messages *msg_A, msg_B, msg_C* was received, then trigger condition is fullfilled and the callbacks are processed in a user-defined order. This is equivalent to OR semantics.
Figure 12 shows an example of the ONE semantics. Thas is, only if message *msg_B* was received, the trigger condition is fullfilled and (potentially all) callbacks are processed in a user-defined order.
Figure 13 describes the custom semantics. A custom trigger condition with could be a more complex logic of multiple messages, can be passed to the executor. This might also include hardware triggers, like interrupts.
- At configuration, the user defines the order of handles.
302
-
- At configuration, the user defines whether the handle shall be called only when new data is available (ON_NEW_DATA) or whether the callback shall always be called (ALWAYS).
303
-
- At runtime, all handles are processed in the user-defined order
304
-
- if the configuration of handle is ON_NEW_DATA, then the corresponding callback is only called if new data is available
305
-
- if the configuration of the handle is ALWAYS, then the corresponding callback is always. If no data is available, then the callback is called with no data (e.g. NULL pointer).
- Assumption: time-triggered system, the executor is activated periodically
@@ -544,8 +551,6 @@ The slides can be downloaded [here](https://ec2a4d36-bac8-4759-b25e-bb1f794177f4
544
551
### Download
545
552
The rclc Executor can be downloaded from the [ros2/rclc repository](https://github.com/ros2/rclc). It is available for the ROS 2 versions Foxy, Galactic and Rolling. The repository provides several packages including the [rclc Executor](https://github.com/ros2/rclc/tree/master/rclc) and an [rclc_examples package](https://github.com/ros2/rclc/tree/master/rclc_examples) with several application examples.
546
553
547
-
548
-
549
554
## Callback-group-level Executor
550
555
551
556
The Callback-group-level Executor was an early prototype for a refined rclcpp Executor API developed in micro-ROS. It has been derived from the default rclcpp Executor and addresses some of the aforementioned deficits. Most important, it was used to validate that the underlying layers (rcl, rmw, rmw_adapter, DDS) allow for multiple Executor instances without any negative interferences.
0 commit comments