C++ API
The C++ user-facing surface lives in
packages/core/nros-cpp/include/nros/*.hpp. Generated by Doxygen;
always reflects the current main branch.
API reference
C++ API Doxygen — start here.
The umbrella header nros/nros.hpp pulls in every
public surface a user application needs.
Where to start
nros/nros.hpp— convenience umbrella includenros::init/nros::shutdown— session lifetimenros::Node— node + create_publisher/subscription/service/client/action_*nros::Publisher<M>/Subscription<M>nros::Service<S>/Client<S>nros::ActionServer<A>/ActionClient<A>— L2 callback model (executor-arena registered).nros::PollingActionServer<A>/PollingActionClient<A>— L1 polling model. Caller drivestry_recv_*/accept_goal/complete_goalfrom a spin loop.nros::Future<T>— async result handlenros::Executor,Timer,GuardConditionnros::ParameterServer<Cap>— node-local typed parameter store (bool/int64_t/double/const char*); compose alongside aNode. See Differences from ROS 2 §9 for what is intentionally smaller thanrclcpp.
The library is freestanding C++14 — no STL, no exceptions. Define
NROS_CPP_STD if you want the optional std::string / std::function /
std::chrono overloads.
Two-layer API. The
nros::ActionServer<A>/ActionClient<A>templates are L2 callback handles (set callbacks vianros_cpp_action_server_set_callbacks, dispatched by the executor). The newnros::PollingActionServer<A>/PollingActionClient<A>are L1 polling templates with the same typed serdes glue but caller-driven control flow. Subscriptions / services / service clients are already L1-shaped in nros-cpp. See Two-Layer API for the per-layer rationale.
Event-driven wake callbacks.
PollingActionServer<A>andPollingActionClient<A>expose a nestedWakeStatePOD and typedset_{goal,cancel,get_result,goal_response, cancel_response,result,feedback}_wake_callback(state, cb, ctx)methods. Pair annros_cpp_wake_state_twith each entity / channel to wake on rx instead of polling.
Generating locally
doxygen packages/core/nros-cpp/Doxyfile
xdg-open target/doc/cpp-api/html/index.html