|
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, rclcpp::ok() |
| node | Node creation and lifecycle (rclcpp::Node) |
| pubsub | Publishers and subscriptions (rclcpp::Publisher<M>, rclcpp::Subscription<M>) |
| service | Service servers and clients (rclcpp::Service<S>, rclcpp::Client<S>) |
| action | Action servers and clients (rclcpp::ActionServer<A>, rclcpp::ActionClient<A>) |
| executor | Callback dispatch, timers, guard conditions |
| clock | Monotonic and wall-clock time |
| qos | Quality-of-Service settings |
| errors | Error codes, rclcpp::Result, RCLCPP_TRY |
| support | Span, FixedString, FixedSequence, std_compat |
Include the umbrella header for the full surface:
Or include only the per-module headers you need (<rclcpp/publisher.hpp>, <rclcpp/subscription.hpp>, …) for faster compile times in large projects.
M must provide (TYPE_NAME, TYPE_HASH, ffi_publish, …)rclcpp::Result, and recovery guidancermw_zenohBy default nros-cpp is freestanding C++14: no STL, no exceptions, no RTTI. Define NROS_CPP_STD before including <rclcpp/rclcpp.hpp> to enable std::string, std::function, and std::chrono convenience overloads on host platforms.