Class NodeThread

Class Documentation

class NodeThread

A background thread to process node/executor callbacks.

Public Functions

explicit NodeThread(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_base)

A background thread to process node callbacks constructor.

Parameters:

node_base – Interface to Node to spin in thread

explicit NodeThread(rclcpp::executors::SingleThreadedExecutor::SharedPtr executor)

A background thread to process executor’s callbacks constructor.

Parameters:

executor – Interface to executor to spin in thread

template<typename NodeT>
inline explicit NodeThread(NodeT node)

A background thread to process node callbacks constructor.

Parameters:

node – Node pointer to spin in thread

~NodeThread()

A destructor.

Protected Attributes

rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_
std::unique_ptr<std::thread> thread_
rclcpp::Executor::SharedPtr executor_