|
1 | 1 | --- |
2 | | -title: Client Library |
| 2 | +title: Introduction to Client Library |
3 | 3 | permalink: /docs/concepts/client_library/ |
4 | 4 | redirect_from: /docs/concepts/ |
5 | 5 | --- |
6 | 6 |
|
7 | | -## Overview |
8 | | - |
9 | 7 | 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. |
10 | 8 |
|
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. In detail, 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, and many more. These are explored and analyzed in a dedicated [decision paper](decision_paper/). |
| 9 | +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. |
| 10 | + |
| 11 | +## Two-layered API |
| 12 | + |
| 13 | +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. |
| 14 | + |
| 15 | +Therefore, we plan to offer/support two APIs: |
| 16 | + |
| 17 | +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, ... |
| 18 | +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. |
| 19 | + |
| 20 | +The basis of discussion for this decision is documented in a dedicated [decision paper](decision_paper/). |
12 | 21 |
|
13 | 22 | ## Advanced Concepts |
14 | 23 |
|
15 | | -Advanced concepts developed in the context of the client library are documented separately. These are: |
| 24 | +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: |
16 | 25 |
|
17 | | -* [Real-Time Executor](/docs/concepts/real-time_executor/) |
18 | | -* [System Modes](/docs/concepts/system_modes/) |
19 | | -* [Embedded Transform (TF)](/docs/concepts/embedded_tf/) |
| 26 | +* [Real-Time Executor](real-time_executor/) |
| 27 | +* [System Modes](system_modes/) |
| 28 | +* [Embedded Transform (TF)](embedded_tf/) |
0 commit comments