Class NodeInstanceWrapper

Class Documentation

class NodeInstanceWrapper

The NodeInstanceWrapper encapsulates the node instance.

Public Types

using NodeBaseInterfaceGetter = std::function<rclcpp::node_interfaces::NodeBaseInterface::SharedPtr(const std::shared_ptr<void>&)>

Public Functions

inline NodeInstanceWrapper()
inline NodeInstanceWrapper(std::shared_ptr<void> node_instance, NodeBaseInterfaceGetter node_base_interface_getter)
inline const std::shared_ptr<void> get_node_instance() const

Get a type-erased pointer to the original Node instance.

This is only for debugging and special cases. For most cases get_node_base_interface will be sufficient.

Returns:

Shared pointer to the encapsulated Node instance.

inline rclcpp::node_interfaces::NodeBaseInterface::SharedPtr get_node_base_interface()

Get NodeBaseInterface pointer for the encapsulated Node Instance.

Returns:

Shared NodeBaseInterface pointer of the encapsulated Node instance.