Introduction to Client Library
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.
To minimize the long-term maintenance cost, we use existing data structures and algorithms from the ROS 2 stack and 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) and a new ROS 2 Client Library package (rclc). Together, as depicted below, rcl + rclc form a feature-complete client library in the C programming language.
Important features and properties:
- Use of rcl data structures where possible to avoid runtime overhead by wrappers.
- Convenience functions for common tasks (e.g., creation of a publisher, finalization of a subscription) provided by rclc.
- Dedicated Executor for fine-grained control over triggering and processing order of callbacks.
- Specialized implementations for graphs, lifecycle nodes, diagnostics, etc.
Check out the subpages (see left) for more information.
For the interested reader: The rationales for the decision to use a combination of rcl + rclc are explained in our decision paper (PDF) from 2019.