Skip to content

Commit 98c247e

Browse files
updated concepts real-time executor (#267)
* updated concepts real-time executor * Update _docs/concepts/client_library/real-time_executor/index.md Co-authored-by: Ralph Lange <ralph-lange@users.noreply.github.com> * fixed typo. Signed-off-by: Staschulat Jan <jan.staschulat@de.bosch.com> Co-authored-by: Ralph Lange <ralph-lange@users.noreply.github.com>
1 parent 5509277 commit 98c247e

3 files changed

Lines changed: 21 additions & 43 deletions

File tree

55.7 KB
Loading

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

Lines changed: 21 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,18 @@ permalink: /docs/concepts/client_library/real-time_executor/
1313
* [Architecture](#architecture)
1414
* [Scheduling Semantics](#scheduling-semantics)
1515

16-
1716
* [RCLC-Executor](#rclc-executor)
1817
* [Requirement Analysis](#requirement-analysis)
1918
* [Features](#features)
2019
* [Executor API](#executor-api)
2120
* [Examples](#examples)
2221
* [Download](#download)
2322

24-
2523
* [Callback-group-level Executor](#callback-group-level-executor)
2624
* [API Changes](#api-changes)
27-
* [Meta Executor Concept](#meta-executor-concept)
2825
* [Test Bench](#test-bench)
2926

30-
3127
* [Related Work](#related-work)
32-
* [Roadmap](#roadmap)
3328
* [References](#references)
3429
* [Acknowledgments](#acknowledgments)
3530

@@ -217,6 +212,14 @@ Based on the real-time embedded use-case as well as the software architecture pa
217212

218213
As stated before, this Executor is based on the RCL library and is written in C to nativly support microcontroller applications written in C. These features are now described in more detail.
219214

215+
The rclc-Executor supports all event types like the ROS 2 rclc executor, which are:
216+
- subscription
217+
- timer
218+
- service
219+
- client
220+
- guard condition
221+
222+
220223
#### Sequential execution
221224

222225
- At configuration, the user defines the order of handles.
@@ -455,19 +458,17 @@ rclc_executor_spin(&exe);
455458
456459
### Summary
457460
458-
The RCLC Executor is an Executor for C applications and can be used with default rclcpp Executor semantics. If additional deterministic behavior is necessary, the user can rely on pre-defined sequential execution, trigged execution and LET-Semantics for data synchronization.
461+
The RCLC Executor is an Executor for C applications and can be used with default rclcpp Executor semantics. If additional deterministic behavior is necessary, the user can rely on pre-defined sequential execution, trigged execution and LET-Semantics for data synchronization. The concept of the rclc-Executor has been published in [SLL2020](#SLL2020).
459462
460463
### Future work
461464
462465
- Full LET semantics (writing data at the end of the period)
463466
- one publisher that periodically publishes
464467
- if Executors are running in multiple threads,
465468
publishing needs to be atomic
466-
- add support for handle types: client, services, guard conditions
467-
468469
469470
### Download
470-
The RCLC-Executor can be downloaded from the micro-ROS GitHub [rclc repository](https://github.com/micro-ROS/rclc). The [rclc package](https://github.com/micro-ROS/rclc/tree/master/rclc) provides the RCLC-Executor library and the [rclc_examples package](https://github.com/micro-ROS/rclc/tree/master/rclc_examples) provides an example, how to use the LET-Executor.
471+
The RCLC-Executor can be downloaded from the [micro-ROS rclc repository](https://github.com/micro-ROS/rclc). In this repository, the [rclc package](https://github.com/micro-ROS/rclc/tree/master/rclc) provides the RCLC-Executor and the [rclc_examples package](https://github.com/micro-ROS/rclc/tree/master/rclc_examples) provides several demos. Further more, the rclc Executor is also available from the [ros2/rclc repository](https://github.com/ros2/rclc).
471472
472473
473474
@@ -506,26 +507,19 @@ In this section, we describe the necessary changes to the Executor API:
506507
* Extended arguments of create\_callback\_group function for the real-time class.
507508
* Removed the get\_associated\_with\_executor\_atomic function.
508509
509-
All the changes can be found in the branches [cbg-executor-0.5.1](https://github.com/boschresearch/ros2_rclcpp/tree/cbg-executor-0.5.1) and [cbg-executor-0.6.1](https://github.com/boschresearch/ros2_rclcpp/tree/cbg-executor-0.6.1/rclcpp) for the corresponding version 0.5.1 and 0.6.1 of the rclcpp in the fork at [github.com/boschresearch/ros2_rclcpp/](https://github.com/boschresearch/ros2_rclcpp/).
510-
511-
### Meta Executor Concept
512-
513-
The idea of the Meta Executor is to abstract away the callback-group assignment, thread allocation and other inner workings of the Executors from the user, thereby presenting a simple API that resembles the original Executor interface. Internally, the Meta Executor maintains multiple instances of our Callback-group-level Executor (Cbg-Executor).
514-
515-
The Meta Executor internally binds these Executors to the underlying kernel threads, assigns them a priority, chooses the scheduling mechanism (e.g., SCHED-FIFO policy) and then dispatches them. When adding a node with its list of callback group and real-time profiles to the Meta Executor, it parses the real-time profiles and assigns the node’s callback groups to the relevant internal Executors.
516-
517-
![Illustration of the Meta-Executor concept](meta-executor_concept.png)
510+
The callback-group-level executor has been merged into ROS 2 rclcpp in [pull request 1218](https://github.com/ros2/rclcpp/pull/1218/commits).
518511
519512
### Test Bench
520513
521514
As a proof of concept, we implemented a small test bench in the present package cbg-executor_ping-pong_cpp. The test bench comprises a Ping node and a Pong node which exchange real-time and best-effort messages simultaneously with each other. Each class of messages is handled with a dedicated Executor, as illustrated in the following figure.
522515
523-
![Architecture for the Callback-group-level Executor test bench](cbg-executor_test-bench_architecture.png)
524-
With the test bench, we validated the functioning of the approach - here on ROS 2 v0.5.1 with the Fast-RTPS DDS implementation - on a typical laptop.
516+
![Architecture for the Callback-group-level Executor test bench](ping_pong_diagram.png)
517+
With the test bench, we validated the functioning of the approach.
525518
526-
![Results from Callback-group-level Executor test bench](cbg-executor_test-bench_results.png)
519+
![Results from Callback-group-level Executor test bench](cbg_executor_demo_plot.png)
520+
In this example, the callback for the high priority task (red line) consumes 10ms and the low priority task (blue line) 40ms in the Pong Node. With a ping rate of 20 Hz, the CPU saturates (10ms\*20+40ms\*20=1000ms). With higher frequencies the high priorty task can continue to send its pong message, while the low priority pong task degrades. With a frequency of 100Hz the high priority task requires 100% CPU utilization. With higher ping rates it keeps sending pong messages with 100Hz, while the low priority task does not get any CPU ressources any more and cannot send any messages.
527521
528-
The test bench is provided in the [cbg-executor_ping-pong_cpp](https://github.com/boschresearch/ros2_examples/tree/experiment/cbg-executor-0.6.1/rclcpp/cbg-executor_ping-pong) package of the [ros2_examples](https://github.com/boschresearch/ros2_examples/) fork.
522+
The test bench is provided in the [cbg_executor_demo](https://github.com/boschresearch/ros2_demos/tree/cbg_executor_demo/cbg_executor_demo).
529523
530524
## Related Work
531525
@@ -610,32 +604,16 @@ doi: 10.1109/SIMPAR.2018.8376277
610604
URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8376277&isnumber=8376259
611605
-->
612606
613-
## Roadmap
614-
615-
2018
616-
617-
* In-depth analysis of the ROS 2 Executor concept.
618-
* Design and analysis of Callback-group-level Executor.
619-
* Validated correct functioning of underlying layers and middleware with multiple Executor instances.
620607
621-
2019
622-
623-
* Design and implementation of LET Executor for rcl.
624-
* Design and implementation of domain-specific Executor for rcl, featuring sense-plan-act semantics
625-
* In-depth runtime analysis of default rclcpp Executor using ROS 2 tracetools developed in micro-ROS.
626-
* Design and implementation of static Executor for rclcpp with improved performance.
627-
* Research of concepts for model-based optimization of end-to-end latencies.
628-
629-
2020
608+
## References
630609
631-
* Integration with a selected advanced scheduling and resource monitoring mechanisms such as reservation-based scheduling.
632-
* Integration with selected sleep modes and low-power modes.
610+
* [L2020]<a name="L2020"></a> Ralph Lange: Advanced Execution Management with ROS 2, ROS-Industrial Conference, Dec 2020 [[Slides]](https://micro-ros.github.io/download/2020-12-16_Advanced_Execution_Management_with_ROS_2.pdf)
633611
634-
## References
612+
* [SLL2020]<a name="SLL2020"></a> J. Staschulat, I. Lütkebohle and R. Lange, "The rclc Executor: Domain-specific deterministic scheduling mechanisms for ROS applications on microcontrollers: work-in-progress," 2020 International Conference on Embedded Software (EMSOFT), Singapore, Singapore, 2020, pp. 18-19. [[Paper]](https://ieeexplore.ieee.org/document/9244014) [[Video]](https://whova.com/embedded/session/eswe_202009/1145800/)
635613
636-
* Ralph Lange: Callback-group-level Executor for ROS 2. Lightning talk at ROSCon 2018. Madrid, Spain. Sep 2018. [[Slides]](https://roscon.ros.org/2018/presentations/ROSCon2018_Lightning1_4.pdf) [[Video]](https://vimeo.com/292707644)
614+
* [L2018]<a name="L2018"></a> Ralph Lange: Callback-group-level Executor for ROS 2. Lightning talk at ROSCon 2018. Madrid, Spain. Sep 2018. [[Slides]](https://roscon.ros.org/2018/presentations/ROSCon2018_Lightning1_4.pdf) [[Video]](https://vimeo.com/292707644)
637615
638-
* [CB2019]<a name="CB2019"> </a> D. Casini, T. Blaß, I. Lütkebohle, B. Brandenburg: Response-Time Analysis of ROS 2 Processing Chains under Reservation-Based Scheduling, in Euromicro-Conference on Real-Time Systems 2019. [[Paper](http://drops.dagstuhl.de/opus/volltexte/2019/10743/)].[[slides]](https://t-blass.de/talks/ECRTS2019.pdf)
616+
* [CB2019]<a name="CB2019"> </a> D. Casini, T. Blaß, I. Lütkebohle, B. Brandenburg: Response-Time Analysis of ROS 2 Processing Chains under Reservation-Based Scheduling, in Euromicro-Conference on Real-Time Systems 2019. [[Paper]](http://drops.dagstuhl.de/opus/volltexte/2019/10743/) [[slides]](https://t-blass.de/talks/ECRTS2019.pdf)
639617
640618
* [EK2018]<a name="EK2018"></a> R. Ernst, S. Kuntz, S. Quinton, M. Simons: The Logical Execution Time Paradigm: New Perspectives for Multicore Systems, February 25-28 2018 (Dagstuhl Seminar 18092). [[Paper]](http://drops.dagstuhl.de/opus/volltexte/2018/9293/pdf/dagrep_v008_i002_p122_18092.pdf)
641619
86.9 KB
Loading

0 commit comments

Comments
 (0)