Nav2 Navigation Stack - humble  humble
ROS 2 Navigation Stack
Public Member Functions | Protected Attributes | List of all members
nav2_util::NodeThread Class Reference

A background thread to process node/executor callbacks. More...

#include <nav2_util/include/nav2_util/node_thread.hpp>

Public Member Functions

 NodeThread (rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_base)
 A background thread to process node callbacks constructor. More...
 
 NodeThread (rclcpp::executors::SingleThreadedExecutor::SharedPtr executor)
 A background thread to process executor's callbacks constructor. More...
 
template<typename NodeT >
 NodeThread (NodeT node)
 A background thread to process node callbacks constructor. More...
 
 ~NodeThread ()
 A destructor.
 

Protected Attributes

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

Detailed Description

A background thread to process node/executor callbacks.

Definition at line 28 of file node_thread.hpp.

Constructor & Destructor Documentation

◆ NodeThread() [1/3]

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

A background thread to process node callbacks constructor.

Parameters
node_baseInterface to Node to spin in thread

Definition at line 22 of file node_thread.cpp.

◆ NodeThread() [2/3]

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

A background thread to process executor's callbacks constructor.

Parameters
executorInterface to executor to spin in thread

Definition at line 35 of file node_thread.cpp.

◆ NodeThread() [3/3]

template<typename NodeT >
nav2_util::NodeThread::NodeThread ( NodeT  node)
inlineexplicit

A background thread to process node callbacks constructor.

Parameters
nodeNode pointer to spin in thread

Definition at line 48 of file node_thread.hpp.


The documentation for this class was generated from the following files: