pub struct NodeBuilder<'a, 'cfg> { /* private fields */ }Expand description
Builder returned by Executor::node_builder(name). Chainable
configuration; .build() registers the Node with the Executor
and returns a NodeId.
rclcpp-aligned API. Mirrors:
rclcpp::Node::make_shared("my_node",
rclcpp::NodeOptions().use_intra_process_comms(true))Where rclcpp uses a single NodeOptions struct, we expose the
individual setters directly on the builder — fewer cycles when
the user only needs one option.
Implementations§
Source§impl<'a, 'cfg> NodeBuilder<'a, 'cfg>
impl<'a, 'cfg> NodeBuilder<'a, 'cfg>
Sourcepub fn rmw(self, name: &'cfg str) -> Self
pub fn rmw(self, name: &'cfg str) -> Self
Select an RMW backend by name. name must match a backend
registered via nros_rmw_cffi_register_named (Phase 104.B.2).
In Phase 104.C.2 (current), the name must match the backend
the Executor was opened against — bridge mode lands in
104.C.3 when per-Node sessions are wired. Passing a name
that doesn’t match the Executor’s session returns
Err(NodeError::BackendMismatch) from .build().
Sourcepub fn locator(self, locator: &'cfg str) -> Self
pub fn locator(self, locator: &'cfg str) -> Self
Override the locator for this Node’s session. Empty / unset = use the Executor’s locator.
Sourcepub fn session_idx(self, idx: u8) -> Self
pub fn session_idx(self, idx: u8) -> Self
Phase 172.K.5 — bind this Node to an explicit session slot (index into
the sessions opened by [Executor::open_multi]: 0 = primary,
N = extra_sessions[N-1]). Bypasses the rmw-based session resolution
— the caller (generated multi-domain wiring) already knows the slot.
Sourcepub fn namespace(self, namespace: &'cfg str) -> Self
pub fn namespace(self, namespace: &'cfg str) -> Self
Namespace for handles created via this Node. Empty = “/”.
Sourcepub fn sched(self, sched: SchedContextId) -> Self
pub fn sched(self, sched: SchedContextId) -> Self
Default SchedContext for
handles registered via this Node. Phase 110 integration —
handles inherit this unless they pass their own SchedContext
at registration time.