Skip to content

Commit 8e2b531

Browse files
committed
Minor corrections in main text of decision paper.
Signed-off-by: Ralph Lange (CR/AEE1) <ralph.lange@de.bosch.com>
1 parent 5a08e53 commit 8e2b531

1 file changed

Lines changed: 22 additions & 23 deletions

File tree

  • _docs/client_library/decision_paper

‎_docs/client_library/decision_paper/index.md‎

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: Client Library - Decision Paper
2+
title: Client Library -- Decision Paper
33
permalink: /docs/client_library/decision_paper/
44
---
55

6-
This document shall serve as decision template for the design and implementation of the micro-ROS client library, at first in the EU project [OFERA](http://ofera.eu/). We discuss different options and existing starting points for this undertaking, decision criteria and analysis results regarding the existing assets.
6+
This document shall serve as decision template for the design and implementation of the micro-ROS client library. We discuss different options and existing starting points for this undertaking, decision criteria and analysis results regarding the existing assets.
77

88
## Assumptions
99

10-
From the past discussions and developments in 2018, we assume that a [rosserial](http://wiki.ros.org/rosserial)- or [ros2arduino](https://github.com/ROBOTIS-GIT/ros2arduino)-like approach is no longer an option in the context of OFERA but that we strive for a solution based on rmw and rcl.
10+
From the past discussions and developments in 2018, we assume that a [rosserial](http://wiki.ros.org/rosserial)- or [ros2arduino](https://github.com/ROBOTIS-GIT/ros2arduino)-like approach is not an option in the context of the [ROS 2 Embedded SIG](https://discourse.ros.org/t/ros2-embedded-sig-meeting-1/) and the EU project [OFERA](http://ofera.eu/), but that we strive for a solution based on rmw and rcl.
1111

1212
## Major Options
1313

14-
1. rclc: Implement a new client library in the C programming language from scratch or from the [few existing, unmaintained lines of code by the OSRF](https://github.com/ros2/rclc/commits/master).
15-
2. rclcplus: Implement a new client library from scratch featuring basic C++ mechanisms (such as templates) but does not require a full-fledged libstdc++ (but some very basic subset only)
14+
1. rclc: Implement a new client library in the C programming language from scratch or from the [few existing, unmaintained lines of code at https://github.com/ros2/rclc/](https://github.com/ros2/rclc/).
15+
2. rclcplus: Implement a new client library from scratch featuring basic C++ mechanisms (such as templates), but not requiring a full-fledged libstdc++ (but some very basic subset only).
1616
3. rclcpp: Modify the rclcpp to be usable on MCUs and NuttX using an (almost) full-fledged libstdc++
1717

1818
## Decision Criteria
@@ -44,7 +44,7 @@ From the past discussions and developments in 2018, we assume that a [rosserial]
4444

4545
## Requirements to micro-ROS Client Library
4646

47-
High-level requirements to the whole micro-ROS stack including the client library are documented in Deliverable [D1.7 Reference Scenarios and Technical System Requirements Definition](http://ofera.eu/storage/deliverables/OFERA_D1.7_Requirements.pdf). Import requirements immediately linked to the client library are:
47+
In the [EU project OFERA](http://ofera.eu/), a list of high-level requirements to the whole micro-ROS stack including the client library has been compiled in the Deliverable [D1.7 Reference Scenarios and Technical System Requirements Definition](http://ofera.eu/storage/deliverables/OFERA_D1.7_Requirements.pdf). Import requirements immediately linked to the client library are:
4848

4949
* ROS2 lifecycle: micro-ROS nodes should support the node lifecycle defined for ROS2 nodes.
5050
* Dynamic component parameters: micro-ROS shall provide mechanisms for dynamic management of component parameters, compatible with ROS mechanisms.
@@ -58,7 +58,7 @@ High-level requirements to the whole micro-ROS stack including the client librar
5858

5959
### rclcpp Library
6060

61-
The rclcpp library features all ROS 2 concepts -- including parameters and lifecycle node - and is maintained actively by the OSRF. Use of rclcpp would give best conditions for porting of ROS 2 user-code to micro-ROS.
61+
The rclcpp library features all ROS 2 concepts -- including parameters and lifecycle node -- and is maintained actively by the OSRF. Use of rclcpp would give best conditions for porting of ROS 2 user-code to micro-ROS.
6262

6363
Questions:
6464

@@ -92,8 +92,8 @@ A list of issues on dynamic memory management and real-time is also discussed in
9292

9393
Questions:
9494

95-
* Is it possible to avoid large heap at all by providing tiny heaps for each concept (node, subscription, publisher) on the corresponding data types on top-most layer? Can each allocation on the lower layers be clearly assigned/related to one instance on the top-most layer?
96-
* Is a two-phase approach - allow dynamic allocation in some initialization phase but not in a later run phase - possible? How much effort is it to implement? Would such an approach be acceptable for some safety-certified implementation?
95+
* Is it possible to avoid a large heap at all by providing tiny heaps for each concept (node, subscription, publisher) on the corresponding data types on top-most layer? Can each allocation on the lower layers be clearly assigned/related to one instance on the top-most layer?
96+
* Is a two-phase approach -- allow dynamic allocation in some initialization phase but not in a later run phase -- possible? How much effort is it to implement? Would such an approach be acceptable for some safety-certified implementation?
9797

9898
As a first experiment, we implemented a simple node and subscriber directly against the rcl in the C programming language and counted the allocations and frees.
9999

@@ -112,10 +112,11 @@ For curiosity, the numbers for Fast-RTPS:
112112

113113
### Current work on ROS 2
114114

115-
Currently there is an active interest in making ROS2 a real "real time" platform. These interest have strive to a set of developments regarding the amount of dynamic memory used along the full stack. From eProsima side they are making a big effort changin Fast RTPS dynamic memory to a static system. This eProsima approach aligns with the idea of two-steps: 1) reserve all memory needed and then 2) work with the pre-allocated memory and avoid new allocations.
115+
Currently there is an active interest in making ROS2 a real "real time" platform. These interest have strive to a set of developments regarding the amount of dynamic memory used along the full stack. From eProsima side they are making a big effort changing Fast RTPS dynamic memory to a static system. This eProsima approach aligns with the idea of two-steps: 1) reserve all memory needed and then 2) work with the pre-allocated memory and avoid new allocations.
116+
116117
To develop this mechanism currently there are to main changes, all regarding STL containers:
117118

118-
* Use of [https://github.com/foonathan/memory](https://github.com/foonathan/memory) system, where similar to the point previously listed in this section questions, there are heaps holding sets of container elements. Them all the operations on the containers are done without relaying in new allocations.
119+
* Use of [https://github.com/foonathan/memory](https://github.com/foonathan/memory) system, where similar to the point previously listed in this section questions, there are heaps holding sets of container elements. Then, all the operations on the containers are done without relaying in new allocations.
119120
* Own vector specialization using two steps, a first reserve of the memory and then make some checks on the traditional API. [https://github.com/eProsima/Fast-RTPS/pull/386](https://github.com/eProsima/Fast-RTPS/pull/386)
120121
* Reuse of container entities.
121122

@@ -131,12 +132,12 @@ First, it is possible to use a subset only, which does not require libstdc++ at
131132
Further links:
132133

133134
* [How to write a C++ program without libstdc++ (http://ptspts.blogspot.com)](http://ptspts.blogspot.com/2010/12/how-to-write-c-program-without-libstdc.html)
134-
* [g++ without libstdc++ - can it be done? (https://stackoverflow.com/questions/3714167/)](https://stackoverflow.com/questions/3714167/g-without-libstdc-can-it-be-done-a-very-configurable-lightweight-libstd)
135+
* [g++ without libstdc++ -- can it be done? (https://stackoverflow.com/questions/3714167/)](https://stackoverflow.com/questions/3714167/g-without-libstdc-can-it-be-done-a-very-configurable-lightweight-libstd)
135136
* [Bit Bashing: C++ On Embedded Systems](https://bitbashing.io/embedded-cpp.html) discusses different language features of C++ and provides guidelines which to enable and which to disable for embedded programming.
136137

137138
### Libcxx
138139

139-
During early stages of NuttX support eProsima did a small POC using libcxx support provided by NuttX. [http://nuttx.org/doku.php?id=wiki:nshhowtos:llvm-stdcxx](http://nuttx.org/doku.php?id=wiki:nshhowtos:llvm-stdcxx). The POC was done using the Assis branch of libcxx however some changes on the makefile were required to be able to compile NuttX.
140+
During early stages of NuttX support, eProsima did a small POC using libcxx support provided by NuttX. [http://nuttx.org/doku.php?id=wiki:nshhowtos:llvm-stdcxx](http://nuttx.org/doku.php?id=wiki:nshhowtos:llvm-stdcxx). The POC was done using the Assis branch of libcxx however some changes on the makefile were required to be able to compile NuttX.
140141

141142
Another options are stripped-down libstdc++ variants with reduced feature sets optimized for embedded applications:
142143

@@ -165,9 +166,7 @@ We have work around this issue implementing the atomic operations on 64Bits as r
165166

166167
A discrimination of the usage of the workaround is still to be done. This should be used ONLY on those architectures not supporting that kind of atomic operations.
167168

168-
See the modified rcl version
169-
170-
* [https://github.com/micro-ROS/rcl/commit/cdb0cca50d49c5b5576bf88d2bb7a1d57ae1e00b](https://github.com/micro-ROS/rcl/commit/cdb0cca50d49c5b5576bf88d2bb7a1d57ae1e00b)
169+
See the modified rcl version at [https://github.com/micro-ROS/rcl/commit/cdb0cca50d49c5b5576bf88d2bb7a1d57ae1e00b](https://github.com/micro-ROS/rcl/commit/cdb0cca50d49c5b5576bf88d2bb7a1d57ae1e00b)
171170

172171
## High-level core features missing in rcl
173172

@@ -183,18 +182,18 @@ Logging
183182

184183
* Optimized implementation for MCU by eProsima
185184

186-
Time / Clock and Timers [eProsima+Bosch+Erle, in Turtlebot demo - step 1]
185+
Time / Clock and Timers [eProsima+Bosch+Erle, in Turtlebot demo -- step 1]
187186
* Jan, looks into rcl time and clock interface
188-
* Synchronization with microprocessor - message types already available in micro-XRCE-DDS
189-
* Adapter for RTOS required - part of abstraction layer ?!
187+
* Synchronization with microprocessor -- message types already available in micro-XRCE-DDS
188+
* Adapter for RTOS required -- part of abstraction layer ?!
190189

191-
Executor [Bosch, in Turtlebot demo - step 1]
190+
Executor [Bosch, in Turtlebot demo -- step 1]
192191

193-
Lifecycle / System modes [Bosch, in Turtlebot demo - step 2]
192+
Lifecycle / System modes [Bosch, in Turtlebot demo -- step 2]
194193

195-
TF [Bosch, in Turtlebot demo - step 3]
194+
TF [Bosch, in Turtlebot demo -- step 3]
196195

197-
Diagnostics [Bosch, in Turtlebot demo - step 2]
196+
Diagnostics [Bosch, in Turtlebot demo -- step 2]
198197

199198
* Liveliness of node: Introduce mechanism in micro-XRCE-DDS similar to standard DDS?
200199
* Make PR for rmw extension with abstract interface to be informed about liveliness of other nodes?!

0 commit comments

Comments
 (0)