Skip to content

Commit f76aa6d

Browse files
committed
updating rcl-executor
1 parent 9ed2bb0 commit f76aa6d

1 file changed

Lines changed: 20 additions & 24 deletions

File tree

  • _docs/concepts/client_library/real-time_executor

‎_docs/concepts/client_library/real-time_executor/index.md‎

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ mit beispielen, wie man es verwendet.
1313
- related work Orocos
1414

1515

16-
##Table of contents
16+
## Table of contents
1717

1818
* [Introduction](#introduction)
1919
* [ROS 2 Executor Concept](#ros-2-executor-concept)
2020
* [RCL Executor](#rcl-executor)
21-
* [API layers](*api-layers)
22-
* [LET executor](*LET-executor)
23-
* [Static order scheduling](*static-order-scheduling)
21+
* [Client library layers](#api-layers)
22+
* [let executor](#LET-executor)
23+
* [API](#API)
2424
* [Background](#background)
25-
* [rclcpp executor](rclcpp-executor)
25+
* [rclcpp executor](#rclcpp-executor)
2626
* [Description](#description)
2727
* [Architecture](#architecture)
2828
* [Analysis](#analysis)
29-
* [EDF Scheduler for ROS2](*EDF-scheduler-ROS2)
29+
* [EDF Scheduler for ROS2](#EDF-scheduler-ROS2)
3030
* analyse rclcpp
3131
* EDF approach
3232
* [Callback-group-level Executor](#callback-group-level-executor)
@@ -42,9 +42,9 @@ mit beispielen, wie man es verwendet.
4242

4343
## Introduction
4444

45-
Predictable execution under given real-time constraints is a crucial requirement for many robotic applications, but is also a complex and time-consuming activity. While the service-based paradigm of ROS allows a fast integration of many different functionalities, it does not provide sufficient control over the execution management. For example, there are no mechanisms to enforce a certain execution order of callbacks within a node, left alone to configure the execution order of different nodes in a ROS system. This is essential for a high quality of control applications, which consist of cause-effect-chains like sensor acquisition, evaluation and actuation control, and operating on old data due to scheduling is not desired. Further more, when input data is collected in field tests, saved with ROS-bags and re-played, often results are different due to non-determinism of process scheduling.
45+
Predictable execution under given real-time constraints is a crucial requirement for many robotic applications, but is also a complex and time-consuming activity. While the service-based paradigm of ROS allows a fast integration of many different functionalities, it does not provide sufficient control over the execution management. For example, there are no mechanisms to enforce a certain execution order of callbacks within a node, left alone to configure the execution order of callbacks of different nodes in a ROS 2 system. This is essential for a high quality of control applications, which consist of cause-effect-chains like sensor acquisition, evaluation and actuation control, and operating on old data due to scheduling is not desired. Further more, when input data is collected in field tests, saved with ROS-bags and re-played, often results are different due to non-determinism of process scheduling.
4646

47-
Of course, it is possible to manually construct the order of subscribing and publishing topics in the callbacks or by tweaking the priorities of the corresponding Linux processes. However, this approach is error-prune, difficult to extend for functionality and requires an in-depth knowledge of every ROS package in the system.
47+
Of course, it is possible to manually setup the order of subscribing and publishing topics in the callbacks or by tweaking the priorities of the corresponding Linux processes. However, this approach is error-prune, difficult to extend and requires an in-depth knowledge of the deplyed ROS 2 packages in the system.
4848

4949
Therefore the goal of the Real-Time Executor is to support roboticists with practical and easy-to-use real-time mechanisms which provide solutions for:
5050
- Deterministic execution
@@ -74,23 +74,10 @@ The dispatching mechanism resembles the ROS 1 spin thread behavior: the Executor
7474

7575
## RCL-Executor
7676

77+
### ROS 2 Layers
78+
As mentioned in [Introduction to Client Library](../index.md)
7779

78-
79-
RCL Executor
80-
- rcl - c layer LET static - order , specific for C API (einordnung bzgl. API layer)
81-
- rclcpp - outlook
82-
- beschreibung des RCL executors
83-
84-
The ROS 2 Executor is responsible for receiving incoming data, calling timers, services etc. The recent paper ) analyzed the Executor in detail. They found out, that these events are not processed in a pure FIFO fashion, but timers are preferred over all other events of the DDS queue. The implication is, that in a high-load situation, only pending timers will be processed while incoming DDS-events will be delayed or starved. Furthermore, the FIFO-strategy makes it difficult to determine time bounds on the total execution time, which are necessary for the verification of safety- and real-time requirements.
85-
86-
##### Concept
87-
To solve these issues, we have implemented an RCL-Executor, which provides different scheduling strategies. Currently, two scheduling policies are implemented: static-order and priority-based scheduling.
88-
89-
In static-order-scheduling, all events, including timers, are processed in a pre-defined order. In case different events (timers, subscriptions, etc.) are available at the DDS queue, then they are all processed in the pre-defined static order.
90-
91-
In priority-based scheduling, a priority is defined for each event. If multiple events are available at the DDS queue, then only the event with the highest priority is processed.
92-
93-
##### User API
80+
### User API
9481
The RCL-Executor is library written in C and is based on RCL. On implementation level we use a different terminology. In the RCL-Executor library an *event* is called a *handle* and *static-order* scheduling is called *FIFO* scheduling.
9582

9683
The RCL-Executor provides the following user interface:
@@ -164,6 +151,15 @@ Also, the Executor does not maintain an explicit callback queue, but relies on t
164151
#### Analysis
165152
The Executor concept, however, does not provide means for prioritization or categorization of the incoming callback calls. Moreover, it does not leverage the real-time characteristics of the underlying operating-system scheduler to have finer control on the order of executions. The overall implication of this behavior is that time-critical callbacks could suffer possible deadline misses and a degraded performance since they are serviced later than non-critical callbacks. Additionally, due to the FIFO mechanism, it is difficult to determine usable bounds on the worst-case latency that each callback execution may incur.
166153

154+
OLD STUFF
155+
156+
The ROS 2 Executor is responsible for receiving incoming data, calling timers, services etc. The recent paper ) analyzed the Executor in detail. They found out, that these events are not processed in a pure FIFO fashion, but timers are preferred over all other events of the DDS queue. The implication is, that in a high-load situation, only pending timers will be processed while incoming DDS-events will be delayed or starved. Furthermore, the FIFO-strategy makes it difficult to determine time bounds on the total execution time, which are necessary for the verification of safety- and real-time requirements.
157+
158+
To solve these issues, we have implemented an RCL-Executor, which provides different scheduling strategies. Currently, two scheduling policies are implemented: static-order and priority-based scheduling.
159+
160+
In static-order-scheduling, all events, including timers, are processed in a pre-defined order. In case different events (timers, subscriptions, etc.) are available at the DDS queue, then they are all processed in the pre-defined static order.
161+
162+
In priority-based scheduling, a priority is defined for each event. If multiple events are available at the DDS queue, then only the event with the highest priority is processed.
167163

168164
### EDF for ROS
169165

0 commit comments

Comments
 (0)