nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
Loading...
Searching...
No Matches
Files
pubsub

Typed publishers and subscriptions (nros::Publisher<M>, nros::Subscription<M>). More...

Files

file  publisher.hpp
 nros::Publisher<M> — typed topic publisher.
 
file  subscription.hpp
 nros::Subscription<M> — typed topic subscriber.
 

Detailed Description

Typed publishers and subscriptions (nros::Publisher<M>, nros::Subscription<M>).

M is a generated message type — see The Message-Type Concept for the required surface. The publish method serialises and forwards via the codegen-emitted M::ffi_publish.

NROS_TRY(node.create_publisher(pub, "/chatter"));
std_msgs::msg::Int32 m{}; m.data = 42;
pub.publish(m);
Definition future.hpp:40
#define NROS_TRY(expr)
Definition result.hpp:90
See also
executor, qos