Function create_node

Source
pub fn create_node(
    context: &Context,
    node_name: &str,
) -> Result<Arc<Node>, RclrsError>
Expand description

Creates a new node in the empty namespace.

Convenience function equivalent to Node::new. Please see that function’s documentation.

§Example

let ctx = Context::new([])?;
let node = rclrs::create_node(&ctx, "my_node");
assert!(node.is_ok());