|
nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
|
Lightweight ROS 2 client library for embedded real-time systems — freestanding C++14 surface that mirrors rclcpp.
See Getting Started for the full walkthrough.
The C++ API is organised into the following module groups (see the Modules tab in the sidebar for each group's contents):
| Group | Description |
|---|---|
| init | Library initialisation, global session, nros::ok() |
| node | Node creation and lifecycle (nros::Node) |
| pubsub | Publishers and subscriptions (nros::Publisher<M>, nros::Subscription<M>) |
| service | Service servers and clients (nros::Service<S>, nros::Client<S>) |
| action | Action servers and clients (nros::ActionServer<A>, nros::ActionClient<A>) |
| executor | Callback dispatch, timers, guard conditions |
| clock | Monotonic and wall-clock time |
| qos | Quality-of-Service settings |
| errors | Error codes, nros::Result, NROS_TRY |
| support | Span, FixedString, FixedSequence, std_compat |
Include the umbrella header for the full surface:
Or include only the per-module headers you need (<nros/publisher.hpp>, <nros/subscription.hpp>, …) for faster compile times in large projects.
M must provide (TYPE_NAME, TYPE_HASH, ffi_publish, …)nros::Result, and recovery guidancermw_zenohBy default nros-cpp is freestanding C++14: no STL, no exceptions, no RTTI. Define NROS_CPP_STD before including <nros/nros.hpp> to enable std::string, std::function, and std::chrono convenience overloads on host platforms.