pub struct Node<'e, 's> { /* private fields */ }Expand description
A ROS 2 node — rclrs’s Node, and the ONE node type (phase-483 W2).
Executor::create_node(name) returns it, and so does
Executor::node_mut(id); a component and a standalone program hold the
same type. It carries rclrs’s methods — create_publisher,
create_subscription(topic, callback), create_service, timers, the
clock, name / namespace / logger, the graph queries — plus RTOS
extensions with names of their own (create_polling_*, the _sized and
_raw constructors).
ADOPT-BOUNDED: a node is a short-lived &mut Executor borrow, not rclrs’s Arc<Node>.
Create entities, then drop it before acquiring the next node handle; entity
handles (HandleId, publishers) are owned and outlive it (no allocator —
see docs/design/0022-entity-api-tiers.md §Borrow model).
Implementations§
Source§impl<'e, 's> Node<'e, 's>
impl<'e, 's> Node<'e, 's>
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The node’s name — rclrs’s Node::name().
phase-483 W2. Read from the executor’s node table, where the name the node was created with (or the launch file’s override of it) lives.
Sourcepub fn namespace(&self) -> &str
pub fn namespace(&self) -> &str
The node’s namespace — rclrs’s Node::namespace(). "" is the root.
Sourcepub fn fully_qualified_name(&self) -> Result<ResolvedName, NodeError>
pub fn fully_qualified_name(&self) -> Result<ResolvedName, NodeError>
/<namespace>/<name> — rclrs’s Node::fully_qualified_name().
Bounded, where rclrs returns a String: no allocator here, and the
two halves are each at most 64 bytes.
Sourcepub fn domain_id(&self) -> u32
pub fn domain_id(&self) -> u32
The node’s ROS domain — rclrs’s Node::domain_id(). Every node of an
executor shares its session, so this is the executor’s domain.
Sourcepub fn logger(&self) -> &'static Logger
pub fn logger(&self) -> &'static Logger
The logger named for this node — rclrs’s Node::logger(). See
NodeHandle::logger for how the name is resolved.
Sourcepub fn id(&self) -> NodeId
pub fn id(&self) -> NodeId
This node’s id in the executor’s node table — an RTOS extension, for
the APIs that address a node by id (Executor::node_mut, the
per-node QoS override table).
Sourcepub fn get_clock(&self) -> Clock
pub fn get_clock(&self) -> Clock
The node’s clock — rclrs’s Node::get_clock(), and rclcpp’s.
phase-417 G6. cpp:Node::get_clock has shipped since issue 0789 and
only the Rust node lacked the accessor: a component reached the clock
through the executor, or constructed one, and the ported line
node.get_clock().now() had nothing to bind.
A delegation, not a second clock. nros_core::clock::Clock is a
one-field value naming a time SOURCE — it holds no state of its own, and
now() on a ROS-time clock reads the process-global override that
install_ros_time_source installs. So
this returns the same answer as the executor’s clock by construction
rather than by agreement, which is the property the graph forwarders in
this family are shaped for.
ROS TIME, as rclcpp’s and rclrs’s node clocks are: with a /clock
source installed it follows the simulator, and with none it reads the
same wall clock Clock::system() does (issue 1334 put those two on one
expression). A component that specifically wants the monotonic source
asks for Clock::steady().
By VALUE, where rclcpp hands back a Clock::SharedPtr: there is no
allocator here (RFC-0022) and the type is Copy, so a handle would be
a pointer to one u8.
Sourcepub fn subscription<'t>(
&mut self,
topic: &'t str,
) -> SubscriptionBuilder<'_, 'e, 't, 's>
pub fn subscription<'t>( &mut self, topic: &'t str, ) -> SubscriptionBuilder<'_, 'e, 't, 's>
Subscription builder (the clone tier). Pick a mode with .typed::<M>()
or .generic(type, hash), set knobs (.qos), then .build(callback).
Sourcepub fn publisher<'t>(
&mut self,
topic: &'t str,
) -> CtxPublisherBuilder<'_, 'e, 't, 's>
pub fn publisher<'t>( &mut self, topic: &'t str, ) -> CtxPublisherBuilder<'_, 'e, 't, 's>
Publisher builder (the clone tier), symmetric with
subscription. Pick .typed::<M>() or
.generic(type, hash), set .qos(), then .build(). The returned
publisher handle is owned and outlives this Node — the bridge
builds the dest publisher on one ctx, drops it, then registers the
source subscription on another (see 0022-entity-api-tiers.md).
Sourcepub fn create_publisher<M: MessageForRmw>(
&mut self,
topic: &str,
) -> Result<EmbeddedPublisher<M>, NodeError>
pub fn create_publisher<M: MessageForRmw>( &mut self, topic: &str, ) -> Result<EmbeddedPublisher<M>, NodeError>
Convenient typed publisher (the fork tier — rclcpp/rclrs shape).
Sourcepub fn create_generic_publisher(
&mut self,
topic: &str,
type_name: &str,
type_hash: &str,
) -> Result<EmbeddedRawPublisher, NodeError>
pub fn create_generic_publisher( &mut self, topic: &str, type_name: &str, type_hash: &str, ) -> Result<EmbeddedRawPublisher, NodeError>
Convenient generic (type-erased) publisher — rclcpp create_generic_*.
Sourcepub fn create_generic_publisher_with_qos(
&mut self,
topic: &str,
type_name: &str,
type_hash: &str,
qos: QoSProfile,
) -> Result<EmbeddedRawPublisher, NodeError>
pub fn create_generic_publisher_with_qos( &mut self, topic: &str, type_name: &str, type_hash: &str, qos: QoSProfile, ) -> Result<EmbeddedRawPublisher, NodeError>
Issue 0306 — the same, with an explicit profile. The declarative
component path needs it: a node that declares
create_publisher_for_topic_with_qos(...) carries its profile in
EntityMetadata::qos, and the runtime used to drop it on the floor by
calling the default-QoS constructor here.
Sourcepub fn create_subscription<M, F>(
&mut self,
topic: &str,
callback: F,
) -> Result<HandleId, NodeError>
pub fn create_subscription<M, F>( &mut self, topic: &str, callback: F, ) -> Result<HandleId, NodeError>
Convenient typed subscription (the fork tier — rclcpp/rclrs shape).
Sugar over the builder with default QoS + buffer.
Sourcepub fn create_callback_group(&self, name: &str) -> CallbackGroup
pub fn create_callback_group(&self, name: &str) -> CallbackGroup
Create a named callback group — a thin token wrapping the group name.
Pass the returned CallbackGroup to the _in create variants
(create_timer_in_group, create_subscription_in_group, create_publisher_in_group)
to label entities with this group. The executor binds the entity’s
callback to the SchedContext seeded via bind_group_sched for
(node_name, namespace, group_name) (phase 273 W1/W2).
let ctrl = node.create_callback_group("ctrl");
node.create_timer_in_group(&ctrl, TimerDuration::from_millis(10), || { /* … */ })?;Names longer than 32 bytes are silently truncated.
Sourcepub fn create_timer_in_group<F>(
&mut self,
group: &CallbackGroup,
period: TimerDuration,
callback: F,
) -> Result<HandleId, NodeError>where
F: FnMut() + 'static,
pub fn create_timer_in_group<F>(
&mut self,
group: &CallbackGroup,
period: TimerDuration,
callback: F,
) -> Result<HandleId, NodeError>where
F: FnMut() + 'static,
Create a repeating timer in a callback group (phase 273, rclcpp shape).
The timer’s callback is bound to the SchedContext associated with
group in the executor’s group_sched_table for this node. If no
entry was seeded for the group, the node’s default SchedContext applies
(same as register_timer). period fires the callback repeatedly.
Sourcepub fn create_guard_condition<F>(
&mut self,
callback: F,
) -> Result<(HandleId, GuardCondition), NodeError>where
F: FnMut() + 'static,
pub fn create_guard_condition<F>(
&mut self,
callback: F,
) -> Result<(HandleId, GuardCondition), NodeError>where
F: FnMut() + 'static,
Create a guard condition on this node — phase-417 W4.e, the Rust half of the one creation shape.
A guard condition is the cross-thread / ISR wake source: any thread may
call GuardCondition::trigger
and the callback runs on the executor’s next spin_once. The flag
itself lives in the executor’s arena, which is what makes the returned
handle Send + Sync with no allocation — so the NODE is the owner a
caller names and the EXECUTOR is where the entity lands, exactly as for
a timer or a subscription.
Until 2026-09-18 the only Rust spelling was
Executor::register_guard_condition,
while C++ created one on the node and C needed three calls. That was the
three-owner state RFC-0089 stage 4 exists to remove; the executor form
survives as the ours-only primitive this calls.
The returned HandleId is the slot, for
trigger_one / bind_handle_to_sched_context; the
GuardCondition is the trigger handle to
hand to the other thread.
let (_id, guard) = node.create_guard_condition(|| { /* woken */ })?;
// from an ISR or another task:
guard.trigger();Sourcepub fn create_timer_on_clock<F>(
&mut self,
period: TimerDuration,
source: TimerClockSource,
callback: F,
) -> Result<HandleId, NodeError>where
F: FnMut() + 'static,
pub fn create_timer_on_clock<F>(
&mut self,
period: TimerDuration,
source: TimerClockSource,
callback: F,
) -> Result<HandleId, NodeError>where
F: FnMut() + 'static,
Create a repeating timer on a chosen CLOCK — phase-430 W4, the
node-level spelling of
Executor::register_timer_on_clock
and the Rust counterpart of C++’s create_timer(clock, period, cb).
create_timer_in_group and the executor’s
register_timer are the WALL case: they consume the spin delta the
executor already measured, and no simulator can slow them down. A
TimerClockSource::Ros timer instead follows /clock, so it stops
while the simulator is paused and tracks a bag’s replay rate; with no
/clock source installed it reads system time, the same fallback
rclcpp::Clock has.
The timer is bound to this node, so the node’s default SchedContext
applies — create_timer_on_clock_in_group
is the callback-group form.
node.create_timer_on_clock(
TimerDuration::from_millis(100),
TimerClockSource::Ros,
|| { /* fires once per 100 ms of SIMULATED time */ },
)?;Sourcepub fn create_timer_on_clock_in_group<F>(
&mut self,
group: &CallbackGroup,
period: TimerDuration,
source: TimerClockSource,
callback: F,
) -> Result<HandleId, NodeError>where
F: FnMut() + 'static,
pub fn create_timer_on_clock_in_group<F>(
&mut self,
group: &CallbackGroup,
period: TimerDuration,
source: TimerClockSource,
callback: F,
) -> Result<HandleId, NodeError>where
F: FnMut() + 'static,
create_timer_on_clock in a callback
group — the clock axis on create_timer_in_group
(phase-430 W4). The two axes are independent: the group decides which
SchedContext the callback runs under, the clock decides what advances
the timer towards its next activation.
Sourcepub fn create_subscription_in_group<M, F>(
&mut self,
group: &CallbackGroup,
topic: &str,
callback: F,
) -> Result<HandleId, NodeError>
pub fn create_subscription_in_group<M, F>( &mut self, group: &CallbackGroup, topic: &str, callback: F, ) -> Result<HandleId, NodeError>
Create a typed subscription in a callback group (phase 273, rclcpp shape).
The subscription’s callback is bound to the SchedContext associated
with group in the group_sched_table for this node. If no entry was
seeded, the node default applies.
Sourcepub fn create_publisher_in_group<M: MessageForRmw>(
&mut self,
_group: &CallbackGroup,
topic: &str,
) -> Result<EmbeddedPublisher<M>, NodeError>
pub fn create_publisher_in_group<M: MessageForRmw>( &mut self, _group: &CallbackGroup, topic: &str, ) -> Result<EmbeddedPublisher<M>, NodeError>
Create a typed publisher in a callback group (phase 273, rclcpp shape).
Publishers do not have an executor-dispatched callback, so the group
name has no scheduling effect today (publishers are explicitly driven by
the user via publish()). The API is provided for symmetry and
forward-compatibility (intra-process / loaned-message knobs may use
it in the future).
Sourcepub fn create_client_with_callback<Svc, F>(
&mut self,
service_name: &str,
callback: F,
) -> Result<ServiceClientCallback<Svc>, NodeError>where
Svc: RosService + 'static,
Svc::Request: MessageForRmw,
Svc::Reply: MessageForRmw,
F: FnMut(&Svc::Reply) + 'static,
pub fn create_client_with_callback<Svc, F>(
&mut self,
service_name: &str,
callback: F,
) -> Result<ServiceClientCallback<Svc>, NodeError>where
Svc: RosService + 'static,
Svc::Request: MessageForRmw,
Svc::Reply: MessageForRmw,
F: FnMut(&Svc::Reply) + 'static,
RFC-0041 / Phase 239.1 — callback-based service client (rclcpp
async_send_request(req, cb) analogue). The reply is delivered to
callback at spin_once (no Promise poll). Returns a
ServiceClientCallback send handle; dual-mode — the Promise-based
create_client is unchanged.
Sourcepub fn create_client_with_callback_sized<Svc, F, const REQ_BUF: usize, const REPLY_BUF: usize>(
&mut self,
service_name: &str,
callback: F,
) -> Result<ServiceClientCallback<Svc, REQ_BUF, REPLY_BUF>, NodeError>where
Svc: RosService + 'static,
Svc::Request: MessageForRmw,
Svc::Reply: MessageForRmw,
F: FnMut(&Svc::Reply) + 'static,
pub fn create_client_with_callback_sized<Svc, F, const REQ_BUF: usize, const REPLY_BUF: usize>(
&mut self,
service_name: &str,
callback: F,
) -> Result<ServiceClientCallback<Svc, REQ_BUF, REPLY_BUF>, NodeError>where
Svc: RosService + 'static,
Svc::Request: MessageForRmw,
Svc::Reply: MessageForRmw,
F: FnMut(&Svc::Reply) + 'static,
Callback-based service client with custom buffer sizes (Phase 239.1).
Sourcepub fn create_action_client_with_callbacks<A, GRespF, FbF, ResF>(
&mut self,
action_name: &str,
on_goal_response: GRespF,
on_feedback: FbF,
on_result: ResF,
) -> Result<ActionClientCallback<A>, NodeError>where
A: RosAction + 'static,
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
GRespF: FnMut(&GoalId, bool) + 'static,
FbF: FnMut(&GoalId, &A::Feedback) + 'static,
ResF: FnMut(&GoalId, GoalStatus, &A::Result) + 'static,
pub fn create_action_client_with_callbacks<A, GRespF, FbF, ResF>(
&mut self,
action_name: &str,
on_goal_response: GRespF,
on_feedback: FbF,
on_result: ResF,
) -> Result<ActionClientCallback<A>, NodeError>where
A: RosAction + 'static,
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
GRespF: FnMut(&GoalId, bool) + 'static,
FbF: FnMut(&GoalId, &A::Feedback) + 'static,
ResF: FnMut(&GoalId, GoalStatus, &A::Result) + 'static,
RFC-0041 / Phase 239.2 — callback-based action client (rclcpp
SendGoalOptions{goal_response_callback, feedback_callback, result_callback} analogue). Goal-response / feedback / result are
delivered to the closures at spin_once. Returns an
ActionClientCallback send handle (send_goal / get_result);
dual-mode — the Promise-based create_action_client
is unchanged.
Sourcepub fn create_action_client_with_callbacks_sized<A, GRespF, FbF, ResF, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize>(
&mut self,
action_name: &str,
on_goal_response: GRespF,
on_feedback: FbF,
on_result: ResF,
) -> Result<ActionClientCallback<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>, NodeError>where
A: RosAction + 'static,
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
GRespF: FnMut(&GoalId, bool) + 'static,
FbF: FnMut(&GoalId, &A::Feedback) + 'static,
ResF: FnMut(&GoalId, GoalStatus, &A::Result) + 'static,
pub fn create_action_client_with_callbacks_sized<A, GRespF, FbF, ResF, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize>(
&mut self,
action_name: &str,
on_goal_response: GRespF,
on_feedback: FbF,
on_result: ResF,
) -> Result<ActionClientCallback<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>, NodeError>where
A: RosAction + 'static,
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
GRespF: FnMut(&GoalId, bool) + 'static,
FbF: FnMut(&GoalId, &A::Feedback) + 'static,
ResF: FnMut(&GoalId, GoalStatus, &A::Result) + 'static,
Callback-based action client with custom buffer sizes (Phase 239.2).
Sourcepub fn create_generic_subscription<F>(
&mut self,
topic: &str,
type_name: &str,
type_hash: &str,
callback: F,
) -> Result<HandleId, NodeError>
pub fn create_generic_subscription<F>( &mut self, topic: &str, type_name: &str, type_hash: &str, callback: F, ) -> Result<HandleId, NodeError>
Convenient generic (type-erased) subscription — rclcpp create_generic_*.
Sourcepub fn create_generic_subscription_with_qos<F>(
&mut self,
topic: &str,
type_name: &str,
type_hash: &str,
qos: QoSProfile,
callback: F,
) -> Result<HandleId, NodeError>
pub fn create_generic_subscription_with_qos<F>( &mut self, topic: &str, type_name: &str, type_hash: &str, qos: QoSProfile, callback: F, ) -> Result<HandleId, NodeError>
Issue 0306 — the same, with an explicit profile (see
Self::create_generic_publisher_with_qos for why).
Sourcepub fn create_subscription_viewable<B, F>(
&mut self,
topic: &str,
callback: F,
) -> Result<HandleId, NodeError>
pub fn create_subscription_viewable<B, F>( &mut self, topic: &str, callback: F, ) -> Result<HandleId, NodeError>
Convenient zero-copy subscription (Phase 229.6, issue 0007 / RFC-0033
view mode).
B is the code-generated VIEWABLE marker (e.g. ImageViewable, emitted
alongside the inline Image for a .msg with a view-mode field).
The marker is zero-sized and carries NO lifetime, which is the whole
reason it exists: B::View<'a> does, and a generic parameter cannot be
the lifetime-carrying type itself. That is also why phase-390 could not
simply rename it to {Msg}View — the view struct already owns that
name, and the marker points AT it.
The callback receives &B::View<'a> — a message whose unbounded
sequence/string fields point directly into the receive buffer (no
heapless::Vec copy); valid only for the callback’s duration.
Uses KEEP_LAST(1) QoS → triple buffer, as view subscriptions require
(a single well-defined slot for the callback). For an explicit deeper
queue use the inline create_subscription;
a view subscription registered with KEEP_LAST(N>1) is rejected.
Sourcepub fn service<'t>(
&mut self,
name: &'t str,
) -> CtxServiceBuilder<'_, 'e, 't, 's>
pub fn service<'t>( &mut self, name: &'t str, ) -> CtxServiceBuilder<'_, 'e, 't, 's>
Service-server builder (the clone tier) — node.service(name).
Set .qos() (defaults to the services profile = RELIABLE+VOLATILE+
KEEP_LAST(10)), then .build::<Svc, _>(callback) (Phase 193.2).
Sourcepub fn create_service<Svc, F>(
&mut self,
name: &str,
callback: F,
) -> Result<HandleId, NodeError>where
Svc: RosService + 'static,
Svc::Request: MessageForRmw,
Svc::Reply: MessageForRmw,
F: FnMut(&Svc::Request) -> Svc::Reply + 'static,
pub fn create_service<Svc, F>(
&mut self,
name: &str,
callback: F,
) -> Result<HandleId, NodeError>where
Svc: RosService + 'static,
Svc::Request: MessageForRmw,
Svc::Reply: MessageForRmw,
F: FnMut(&Svc::Request) -> Svc::Reply + 'static,
Convenient service server (the fork tier — rclrs/rclcpp shape), default
services QoS. Mirror of create_subscription.
Sourcepub fn get_node_names(
&mut self,
visit: &mut dyn FnMut(&str, &str) -> bool,
) -> Result<(), NodeError>
pub fn get_node_names( &mut self, visit: &mut dyn FnMut(&str, &str) -> bool, ) -> Result<(), NodeError>
Every node on the graph, with its namespace — rclrs’s
Node::get_node_names.
visit(name, namespace) once per node. For the enclave as well, use
get_node_names_with_enclaves:
one backend slot answers both, exactly as rmw_get_node_names and
rmw_get_node_names_with_enclaves are one query upstream.
Reports what has been DISCOVERED and never blocks, so an empty
enumeration means “nobody seen yet”, not “nobody exists”;
Err(Transport(Unsupported)) from a backend with no graph is a
different answer from empty. See the module note above.
Sourcepub fn get_node_names_with_enclaves(
&mut self,
visit: &mut dyn FnMut(&str, &str, Option<&str>) -> bool,
) -> Result<(), NodeError>
pub fn get_node_names_with_enclaves( &mut self, visit: &mut dyn FnMut(&str, &str, Option<&str>) -> bool, ) -> Result<(), NodeError>
Every node on the graph with its namespace AND its enclave — rclrs’s
Node::get_node_names_with_enclaves.
visit(name, namespace, enclave). enclave is None when the backend
reports the node but not its enclave, which is a partial answer rather
than an error — reporting the node without the enclave beats dropping
it. Same discovery envelope as get_node_names.
Sourcepub fn get_topic_names_and_types(
&mut self,
visit: &mut dyn FnMut(&str, &[&str]) -> bool,
) -> Result<(), NodeError>
pub fn get_topic_names_and_types( &mut self, visit: &mut dyn FnMut(&str, &[&str]) -> bool, ) -> Result<(), NodeError>
Every topic on the graph, with the types on it — rclrs’s
Node::get_topic_names_and_types.
visit(topic_name, types) once per distinct TOPIC: a topic carrying
two types is one call with two entries, not two calls. types may
legitimately be empty on a partially discovered graph. Same discovery
envelope as get_node_names.
Sourcepub fn get_service_names_and_types(
&mut self,
visit: &mut dyn FnMut(&str, &[&str]) -> bool,
) -> Result<(), NodeError>
pub fn get_service_names_and_types( &mut self, visit: &mut dyn FnMut(&str, &[&str]) -> bool, ) -> Result<(), NodeError>
Every service on the graph, with its types — rclrs’s
Node::get_service_names_and_types. As
get_topic_names_and_types, over
servers and clients.
Sourcepub fn count_publishers(&mut self, topic_name: &str) -> Result<usize, NodeError>
pub fn count_publishers(&mut self, topic_name: &str) -> Result<usize, NodeError>
How many publishers are visible on topic_name — rclrs’s
Node::count_publishers.
This is the GRAPH’s count, not this node’s. The number of
publishers this node itself DECLARED is
StandaloneNode::publisher_count, a different
question with a different answer.
A count reflects what has been DISCOVERED, so it can be low right after
startup and is never a proof of absence. See
get_node_names.
Sourcepub fn count_subscriptions(
&mut self,
topic_name: &str,
) -> Result<usize, NodeError>
pub fn count_subscriptions( &mut self, topic_name: &str, ) -> Result<usize, NodeError>
How many subscriptions are visible on topic_name — rclrs’s
Node::count_subscriptions.
subscriptions, not subscribers — this is rclrs’s spelling, and
the Rust surface takes its vocabulary from rclrs so a user porting Rust
ROS 2 code types what they already know. The C surface says
subscribers because rcl does, and the vtable slot says subscribers
because upstream rmw does. Three layers, three upstreams, one word each
— not drift.
The graph’s count, not this node’s; see
count_publishers for that distinction and
for the discovery caveats.
Sourcepub fn get_publisher_names_and_types_by_node(
&mut self,
node_name: &str,
node_namespace: &str,
visit: &mut dyn FnMut(&str, &[&str]) -> bool,
) -> Result<(), NodeError>
pub fn get_publisher_names_and_types_by_node( &mut self, node_name: &str, node_namespace: &str, visit: &mut dyn FnMut(&str, &[&str]) -> bool, ) -> Result<(), NodeError>
What one named node PUBLISHES, with the types — rclrs’s
Node::get_publisher_names_and_types_by_node.
A node the graph has not discovered yields no visits, which is not an
error — see get_node_names for why an empty
answer means “not seen yet”.
Sourcepub fn get_subscription_names_and_types_by_node(
&mut self,
node_name: &str,
node_namespace: &str,
visit: &mut dyn FnMut(&str, &[&str]) -> bool,
) -> Result<(), NodeError>
pub fn get_subscription_names_and_types_by_node( &mut self, node_name: &str, node_namespace: &str, visit: &mut dyn FnMut(&str, &[&str]) -> bool, ) -> Result<(), NodeError>
What one named node SUBSCRIBES to, with the types — rclrs’s
Node::get_subscription_names_and_types_by_node. See
count_subscriptions on the spelling.
Sourcepub fn get_service_names_and_types_by_node(
&mut self,
node_name: &str,
node_namespace: &str,
visit: &mut dyn FnMut(&str, &[&str]) -> bool,
) -> Result<(), NodeError>
pub fn get_service_names_and_types_by_node( &mut self, node_name: &str, node_namespace: &str, visit: &mut dyn FnMut(&str, &[&str]) -> bool, ) -> Result<(), NodeError>
What services one named node SERVES, with the types — rclrs’s
Node::get_service_names_and_types_by_node.
Sourcepub fn get_client_names_and_types_by_node(
&mut self,
node_name: &str,
node_namespace: &str,
visit: &mut dyn FnMut(&str, &[&str]) -> bool,
) -> Result<(), NodeError>
pub fn get_client_names_and_types_by_node( &mut self, node_name: &str, node_namespace: &str, visit: &mut dyn FnMut(&str, &[&str]) -> bool, ) -> Result<(), NodeError>
What services one named node CALLS, with the types — rclrs’s
Node::get_client_names_and_types_by_node.
Sourcepub fn get_publishers_info_by_topic(
&mut self,
topic_name: &str,
visit: &mut dyn FnMut(&GraphEndpointInfo<'_>) -> bool,
) -> Result<(), NodeError>
pub fn get_publishers_info_by_topic( &mut self, topic_name: &str, visit: &mut dyn FnMut(&GraphEndpointInfo<'_>) -> bool, ) -> Result<(), NodeError>
The PUBLISHERS on topic_name, one visit each — rclrs’s
Node::get_publishers_info_by_topic.
The last two members of the graph family to reach upstream’s receiver.
visit(info) per discovered endpoint; every &str on the
GraphEndpointInfo is BORROWED for the
duration of that call, so copy anything you keep, and returning false
stops the walk.
ADOPT-BOUNDED: rclrs returns an owned Vec<TopicEndpointInfo>; here the
answer is STREAMED to visit, because the graph has no bound a caller could
size a buffer to and there is no allocator for a Vec. It reports what has
been DISCOVERED and never blocks, so an empty walk means “nobody seen yet”;
a backend with no graph answers Err(Transport(Unsupported)), never an
empty Ok.
It carries NO QoS, and that absence is the point: the GRANTED profile is what answers “why is nothing arriving”, no backend can read a remote’s back yet, and reporting the remote’s DECLARED profile instead would be the confident wrong answer the field exists to avoid.
Sourcepub fn get_subscriptions_info_by_topic(
&mut self,
topic_name: &str,
visit: &mut dyn FnMut(&GraphEndpointInfo<'_>) -> bool,
) -> Result<(), NodeError>
pub fn get_subscriptions_info_by_topic( &mut self, topic_name: &str, visit: &mut dyn FnMut(&GraphEndpointInfo<'_>) -> bool, ) -> Result<(), NodeError>
The SUBSCRIPTIONS on topic_name, one visit each — rclrs’s
Node::get_subscriptions_info_by_topic. See
get_publishers_info_by_topic.
Same envelope: STREAMED to visit rather than returned as a Vec, every
&str borrowed for the visit, discovered-only and non-blocking, and
Err(Transport(Unsupported)) from a backend with no graph.
Sourcepub fn create_publisher_with_qos<M: MessageForRmw>(
&mut self,
topic_name: &str,
qos: QoSProfile,
) -> Result<EmbeddedPublisher<M>, NodeError>
pub fn create_publisher_with_qos<M: MessageForRmw>( &mut self, topic_name: &str, qos: QoSProfile, ) -> Result<EmbeddedPublisher<M>, NodeError>
create_publisher with an explicit profile (phase-483 W2).
Through NodeHandle::create_publisher_with_qos, so a publisher made
here gets what one made on the handle Executor::create_node used to
return: the node’s remap rules (launch, then --ros-args), the plan’s
QoS overrides and the declared-QoS check. Executor::create_publisher_on
takes a name its caller already resolved, which is right for the C and
component roads and wrong for a user’s source name.
Sourcepub fn create_publisher_raw(
&mut self,
topic_name: &str,
type_name: &str,
type_hash: &str,
) -> Result<EmbeddedRawPublisher, NodeError>
pub fn create_publisher_raw( &mut self, topic_name: &str, type_name: &str, type_hash: &str, ) -> Result<EmbeddedRawPublisher, NodeError>
NodeHandle::create_publisher_raw on this node (phase-483 W2).
Sourcepub fn create_publisher_raw_with_qos(
&mut self,
topic_name: &str,
type_name: &str,
type_hash: &str,
qos: QoSProfile,
) -> Result<EmbeddedRawPublisher, NodeError>
pub fn create_publisher_raw_with_qos( &mut self, topic_name: &str, type_name: &str, type_hash: &str, qos: QoSProfile, ) -> Result<EmbeddedRawPublisher, NodeError>
NodeHandle::create_publisher_raw_with_qos on this node (phase-483 W2).
Sourcepub fn create_polling_subscription<M: MessageForRmw>(
&mut self,
topic_name: &str,
) -> Result<Subscription<M>, NodeError>
pub fn create_polling_subscription<M: MessageForRmw>( &mut self, topic_name: &str, ) -> Result<Subscription<M>, NodeError>
The POLLED form of NodeHandle::create_subscription (phase-483 W2): the caller
takes from it, where rclrs’s create_subscription takes a callback.
Sourcepub fn create_polling_subscription_sized<M: MessageForRmw, const RX_BUF: usize>(
&mut self,
topic_name: &str,
) -> Result<Subscription<M, RX_BUF>, NodeError>
pub fn create_polling_subscription_sized<M: MessageForRmw, const RX_BUF: usize>( &mut self, topic_name: &str, ) -> Result<Subscription<M, RX_BUF>, NodeError>
The POLLED form of NodeHandle::create_subscription_sized (phase-483 W2): the caller
takes from it, where rclrs’s create_subscription takes a callback.
Sourcepub fn create_polling_subscription_with_qos<M: MessageForRmw, const RX_BUF: usize>(
&mut self,
topic_name: &str,
qos: QoSProfile,
) -> Result<Subscription<M, RX_BUF>, NodeError>
pub fn create_polling_subscription_with_qos<M: MessageForRmw, const RX_BUF: usize>( &mut self, topic_name: &str, qos: QoSProfile, ) -> Result<Subscription<M, RX_BUF>, NodeError>
The POLLED form of NodeHandle::create_subscription_with_qos (phase-483 W2): the caller
takes from it, where rclrs’s create_subscription takes a callback.
Sourcepub fn create_polling_subscription_raw(
&mut self,
topic_name: &str,
type_name: &str,
type_hash: &str,
) -> Result<RawSubscription, NodeError>
pub fn create_polling_subscription_raw( &mut self, topic_name: &str, type_name: &str, type_hash: &str, ) -> Result<RawSubscription, NodeError>
The POLLED form of NodeHandle::create_subscription_raw (phase-483 W2): the caller
takes from it, where rclrs’s create_subscription takes a callback.
Sourcepub fn create_polling_subscription_raw_sized<const RX_BUF: usize>(
&mut self,
topic_name: &str,
type_name: &str,
type_hash: &str,
) -> Result<RawSubscription<RX_BUF>, NodeError>
pub fn create_polling_subscription_raw_sized<const RX_BUF: usize>( &mut self, topic_name: &str, type_name: &str, type_hash: &str, ) -> Result<RawSubscription<RX_BUF>, NodeError>
The POLLED form of NodeHandle::create_subscription_raw_sized (phase-483 W2): the caller
takes from it, where rclrs’s create_subscription takes a callback.
Sourcepub fn create_polling_service<Svc: RosService>(
&mut self,
service_name: &str,
) -> Result<EmbeddedServiceServer<Svc>, NodeError>
pub fn create_polling_service<Svc: RosService>( &mut self, service_name: &str, ) -> Result<EmbeddedServiceServer<Svc>, NodeError>
The POLLED form of NodeHandle::create_service (phase-483 W2): the caller
takes from it, where rclrs’s create_service takes a callback.
Sourcepub fn create_polling_service_with_qos<Svc: RosService>(
&mut self,
service_name: &str,
qos: QoSProfile,
) -> Result<EmbeddedServiceServer<Svc>, NodeError>
pub fn create_polling_service_with_qos<Svc: RosService>( &mut self, service_name: &str, qos: QoSProfile, ) -> Result<EmbeddedServiceServer<Svc>, NodeError>
The POLLED form of NodeHandle::create_service_with_qos (phase-483 W2): the caller
takes from it, where rclrs’s create_service takes a callback.
Sourcepub fn create_polling_service_sized<Svc: RosService, const REQ_BUF: usize, const REPLY_BUF: usize>(
&mut self,
service_name: &str,
qos: QoSProfile,
) -> Result<EmbeddedServiceServer<Svc, REQ_BUF, REPLY_BUF>, NodeError>
pub fn create_polling_service_sized<Svc: RosService, const REQ_BUF: usize, const REPLY_BUF: usize>( &mut self, service_name: &str, qos: QoSProfile, ) -> Result<EmbeddedServiceServer<Svc, REQ_BUF, REPLY_BUF>, NodeError>
The POLLED form of NodeHandle::create_service_sized (phase-483 W2): the caller
takes from it, where rclrs’s create_service takes a callback.
Sourcepub fn create_client<Svc: RosService>(
&mut self,
service_name: &str,
) -> Result<EmbeddedServiceClient<Svc>, NodeError>
pub fn create_client<Svc: RosService>( &mut self, service_name: &str, ) -> Result<EmbeddedServiceClient<Svc>, NodeError>
NodeHandle::create_client on this node (phase-483 W2).
Sourcepub fn create_client_with_qos<Svc: RosService>(
&mut self,
service_name: &str,
qos: QoSProfile,
) -> Result<EmbeddedServiceClient<Svc>, NodeError>
pub fn create_client_with_qos<Svc: RosService>( &mut self, service_name: &str, qos: QoSProfile, ) -> Result<EmbeddedServiceClient<Svc>, NodeError>
NodeHandle::create_client_with_qos on this node (phase-483 W2).
Sourcepub fn create_client_sized<Svc: RosService, const REQ_BUF: usize, const REPLY_BUF: usize>(
&mut self,
service_name: &str,
qos: QoSProfile,
) -> Result<EmbeddedServiceClient<Svc, REQ_BUF, REPLY_BUF>, NodeError>
pub fn create_client_sized<Svc: RosService, const REQ_BUF: usize, const REPLY_BUF: usize>( &mut self, service_name: &str, qos: QoSProfile, ) -> Result<EmbeddedServiceClient<Svc, REQ_BUF, REPLY_BUF>, NodeError>
NodeHandle::create_client_sized on this node (phase-483 W2).
Sourcepub fn create_polling_service_raw(
&mut self,
service_name: &str,
type_name: &str,
type_hash: &str,
) -> Result<RawServiceServer, NodeError>
pub fn create_polling_service_raw( &mut self, service_name: &str, type_name: &str, type_hash: &str, ) -> Result<RawServiceServer, NodeError>
The POLLED form of NodeHandle::create_service_raw (phase-483 W2): the caller
takes from it, where rclrs’s create_service takes a callback.
Sourcepub fn create_polling_service_raw_sized<const REQ_BUF: usize, const RESP_BUF: usize>(
&mut self,
service_name: &str,
type_name: &str,
type_hash: &str,
) -> Result<RawServiceServer<REQ_BUF, RESP_BUF>, NodeError>
pub fn create_polling_service_raw_sized<const REQ_BUF: usize, const RESP_BUF: usize>( &mut self, service_name: &str, type_name: &str, type_hash: &str, ) -> Result<RawServiceServer<REQ_BUF, RESP_BUF>, NodeError>
The POLLED form of NodeHandle::create_service_raw_sized (phase-483 W2): the caller
takes from it, where rclrs’s create_service takes a callback.
Sourcepub fn create_client_raw(
&mut self,
service_name: &str,
type_name: &str,
type_hash: &str,
) -> Result<RawServiceClient, NodeError>
pub fn create_client_raw( &mut self, service_name: &str, type_name: &str, type_hash: &str, ) -> Result<RawServiceClient, NodeError>
NodeHandle::create_client_raw on this node (phase-483 W2).
Sourcepub fn create_client_raw_sized<const REQ_BUF: usize, const REPLY_BUF: usize>(
&mut self,
service_name: &str,
type_name: &str,
type_hash: &str,
) -> Result<RawServiceClient<REQ_BUF, REPLY_BUF>, NodeError>
pub fn create_client_raw_sized<const REQ_BUF: usize, const REPLY_BUF: usize>( &mut self, service_name: &str, type_name: &str, type_hash: &str, ) -> Result<RawServiceClient<REQ_BUF, REPLY_BUF>, NodeError>
NodeHandle::create_client_raw_sized on this node (phase-483 W2).
Sourcepub fn create_action_server_raw(
&mut self,
action_name: &str,
type_name: &str,
type_hash: &str,
) -> Result<ActionServerCore<{ crate::config::DEFAULT_RX_BUF_SIZE }, { crate::config::DEFAULT_RX_BUF_SIZE }, { crate::config::DEFAULT_RX_BUF_SIZE }, 4>, NodeError>
pub fn create_action_server_raw( &mut self, action_name: &str, type_name: &str, type_hash: &str, ) -> Result<ActionServerCore<{ crate::config::DEFAULT_RX_BUF_SIZE }, { crate::config::DEFAULT_RX_BUF_SIZE }, { crate::config::DEFAULT_RX_BUF_SIZE }, 4>, NodeError>
NodeHandle::create_action_server_raw on this node (phase-483 W2).
Sourcepub fn create_action_server_raw_sized<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize>(
&mut self,
action_name: &str,
type_name: &str,
type_hash: &str,
) -> Result<ActionServerCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>, NodeError>
pub fn create_action_server_raw_sized<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize>( &mut self, action_name: &str, type_name: &str, type_hash: &str, ) -> Result<ActionServerCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>, NodeError>
NodeHandle::create_action_server_raw_sized on this node (phase-483 W2).
Sourcepub fn create_action_client_raw(
&mut self,
action_name: &str,
type_name: &str,
type_hash: &str,
) -> Result<ActionClientCore<{ crate::config::DEFAULT_RX_BUF_SIZE }, { crate::config::DEFAULT_RX_BUF_SIZE }, { crate::config::DEFAULT_RX_BUF_SIZE }>, NodeError>
pub fn create_action_client_raw( &mut self, action_name: &str, type_name: &str, type_hash: &str, ) -> Result<ActionClientCore<{ crate::config::DEFAULT_RX_BUF_SIZE }, { crate::config::DEFAULT_RX_BUF_SIZE }, { crate::config::DEFAULT_RX_BUF_SIZE }>, NodeError>
NodeHandle::create_action_client_raw on this node (phase-483 W2).
Sourcepub fn create_action_client_raw_sized<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize>(
&mut self,
action_name: &str,
type_name: &str,
type_hash: &str,
) -> Result<ActionClientCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>, NodeError>
pub fn create_action_client_raw_sized<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize>( &mut self, action_name: &str, type_name: &str, type_hash: &str, ) -> Result<ActionClientCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>, NodeError>
NodeHandle::create_action_client_raw_sized on this node (phase-483 W2).
Sourcepub fn create_action_server<A: RosAction>(
&mut self,
action_name: &str,
) -> Result<ActionServer<A>, NodeError>where
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
A::SendGoalRequest: MessageForRmw,
A::SendGoalResponse: MessageForRmw,
A::GetResultRequest: MessageForRmw,
A::GetResultResponse: MessageForRmw,
A::FeedbackMessage: MessageForRmw,
pub fn create_action_server<A: RosAction>(
&mut self,
action_name: &str,
) -> Result<ActionServer<A>, NodeError>where
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
A::SendGoalRequest: MessageForRmw,
A::SendGoalResponse: MessageForRmw,
A::GetResultRequest: MessageForRmw,
A::GetResultResponse: MessageForRmw,
A::FeedbackMessage: MessageForRmw,
NodeHandle::create_action_server on this node (phase-483 W2).
Sourcepub fn create_action_server_sized<A: RosAction, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize>(
&mut self,
action_name: &str,
) -> Result<ActionServer<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>, NodeError>where
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
A::SendGoalRequest: MessageForRmw,
A::SendGoalResponse: MessageForRmw,
A::GetResultRequest: MessageForRmw,
A::GetResultResponse: MessageForRmw,
A::FeedbackMessage: MessageForRmw,
pub fn create_action_server_sized<A: RosAction, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize>(
&mut self,
action_name: &str,
) -> Result<ActionServer<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>, NodeError>where
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
A::SendGoalRequest: MessageForRmw,
A::SendGoalResponse: MessageForRmw,
A::GetResultRequest: MessageForRmw,
A::GetResultResponse: MessageForRmw,
A::FeedbackMessage: MessageForRmw,
NodeHandle::create_action_server_sized on this node (phase-483 W2).
Sourcepub fn create_action_client<A: RosAction>(
&mut self,
action_name: &str,
) -> Result<ActionClient<A>, NodeError>where
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
A::SendGoalRequest: MessageForRmw,
A::SendGoalResponse: MessageForRmw,
A::GetResultRequest: MessageForRmw,
A::GetResultResponse: MessageForRmw,
A::FeedbackMessage: MessageForRmw,
pub fn create_action_client<A: RosAction>(
&mut self,
action_name: &str,
) -> Result<ActionClient<A>, NodeError>where
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
A::SendGoalRequest: MessageForRmw,
A::SendGoalResponse: MessageForRmw,
A::GetResultRequest: MessageForRmw,
A::GetResultResponse: MessageForRmw,
A::FeedbackMessage: MessageForRmw,
NodeHandle::create_action_client on this node (phase-483 W2).
Sourcepub fn create_action_client_sized<A: RosAction, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize>(
&mut self,
action_name: &str,
) -> Result<ActionClient<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>, NodeError>where
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
A::SendGoalRequest: MessageForRmw,
A::SendGoalResponse: MessageForRmw,
A::GetResultRequest: MessageForRmw,
A::GetResultResponse: MessageForRmw,
A::FeedbackMessage: MessageForRmw,
pub fn create_action_client_sized<A: RosAction, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize>(
&mut self,
action_name: &str,
) -> Result<ActionClient<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>, NodeError>where
A::Goal: MessageForRmw,
A::Result: MessageForRmw,
A::Feedback: MessageForRmw,
A::SendGoalRequest: MessageForRmw,
A::SendGoalResponse: MessageForRmw,
A::GetResultRequest: MessageForRmw,
A::GetResultResponse: MessageForRmw,
A::FeedbackMessage: MessageForRmw,
NodeHandle::create_action_client_sized on this node (phase-483 W2).