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/introduction/index.md
+11-16Lines changed: 11 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,26 +6,21 @@ redirect_from:
6
6
- /docs/concepts/client_library/
7
7
---
8
8
9
-
The client library provides the micro-ROS API for the user code, i.e. for application-level micro-ROS nodes. The overall goal is to provide all relevant, major ROS 2 concepts in suitable implementation for microcontrollers. Where possible, API compatibility with ROS 2 shall be achieved for ease of portability.
9
+
The Client Library provides the micro-ROS API for the user code, i.e., for application-level micro-ROS nodes. The goal is to provide all relevant, major ROS 2 concepts in an optimized implementation for microcontrollers. At the same time, we strive to make the API as compatible as possible to standard ROS 2, to facilitate porting of code.
10
10
11
-
In this undertaking, to minimize the long-term maintenance cost, we strive to use existing data structures and algorithms from the ROS 2 stack or to bring necessary changes in the mainline stack. This raises a lot of question regarding the applicability of existing ROS 2 layers on microcontrollers in terms of runtime efficiency, portability to different RTOS, dynamic memory management, etc.
11
+
To minimize the long-term maintenance cost, we use existing data structures and algorithms from the ROS 2 stack and to bring necessary changes in the mainline stack as far as possible. That's why the micro-ROS client library is built up from standard [ROS 2 Client Support Library (rcl)](https://github.com/ros2/rcl/) and a new [ROS 2 Client Library package (rclc)](https://github.com/ros2/rclc/). Together, as depicted below, rcl + rclc form a feature-complete client library in the C programming language.
While C is still the dominating programming language for microcontrollers, there is a clear trend towards the use of higher-level languages, in particular C++. This trend is also driven by modern microcontrollers featuring several hundred kilobytes or even few megabytes of RAM.
15
+
Important features and properties:
16
16
17
-
Therefore, we plan to offer/support two APIs:
17
+
* Use of rcl data structures where possible to avoid runtime overhead by wrappers.
18
+
* Convenience functions for common tasks (e.g., creation of a publisher, finalization of a subscription) provided by rclc.
19
+
* Dedicated Executor for fine-grained control over triggering and processing order of callbacks.
20
+
* Specialized implementations for graphs, lifecycle nodes, diagnostics, etc.
18
21
19
-
1. A **C API** based on the [ROS 2 Support Client Library (rcl)](https://github.com/ros2/rcl/), enriched with modular packages for execution management, diagnostics, parameters, ...
20
-
2. A **C++ API** based on the [ROS 2 rclcpp](https://github.com/ros2/rclcpp/), which at first requires analyzing the fitness of rclcpp for use on microcontrollers, in particular regarding memory and CPU consumption as well as dynamic memory management.
The basis of discussion for this decision is documented in a dedicated [decision paper](decision_paper/).
25
-
26
-
## Advanced Concepts
27
-
28
-
Advanced concepts developed in the context of the client library are documented separately. In general, these concepts are developed for the standard rclcpp first, before implementing a tailored C version. These are:
29
-
30
-
*[Real-Time Executor](real-time_executor/)
31
-
*[System Modes](system_modes/)
26
+
For the interested reader: The rationales for the decision to use a combination of rcl + rclc are explained in our [decision paper](decision_paper/) from 2019.
0 commit comments