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

Topic publishers and subscriptions. More...

Files

file  publisher.h
 Topic publisher API.
 
file  subscription.h
 Topic subscription API.
 

Detailed Description

Topic publishers and subscriptions.

rcl_publisher_t sends typed (or raw-CDR) messages on a topic; rcl_subscription_t receives them through a callback registered on the executor, which owns the subscriber. A subscription polled manually is the separate type rclc_polling_subscription_t, drained with rclc_polling_subscription_take_serialized.

rcl_publisher_t pub = nros_publisher_get_zero_initialized();
nros_publisher_init(&pub, &node, &type_info, "/chatter");
rclc_publish_raw(&pub, cdr_buf, cdr_len);
rcl_ret_t rclc_publish_raw(const struct rcl_publisher_t *publisher, const uint8_t *data, size_t len)
Definition nros_generated.h:2076
See also
executor, qos