rclcpp  master
C++ ROS Client Library API
Classes | Typedefs | Functions
rclcpp::executors Namespace Reference

Classes

class  MultiThreadedExecutor
 
class  SingleThreadedExecutor
 Single-threaded executor implementation. More...
 
class  StaticExecutorEntitiesCollector
 
class  StaticSingleThreadedExecutor
 Static executor implementation. More...
 

Typedefs

typedef std::map< rclcpp::CallbackGroup::WeakPtr, rclcpp::node_interfaces::NodeBaseInterface::WeakPtr, std::owner_less< rclcpp::CallbackGroup::WeakPtr > > WeakCallbackGroupsToNodesMap
 

Functions

template<typename FutureT , typename TimeRepT = int64_t, typename TimeT = std::milli>
rclcpp::FutureReturnCode spin_node_until_future_complete (rclcpp::Executor &executor, rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr, const FutureT &future, std::chrono::duration< TimeRepT, TimeT > timeout=std::chrono::duration< TimeRepT, TimeT >(-1))
 Spin (blocking) until the future is complete, it times out waiting, or rclcpp is interrupted. More...
 
template<typename NodeT = rclcpp::Node, typename FutureT , typename TimeRepT = int64_t, typename TimeT = std::milli>
rclcpp::FutureReturnCode spin_node_until_future_complete (rclcpp::Executor &executor, std::shared_ptr< NodeT > node_ptr, const FutureT &future, std::chrono::duration< TimeRepT, TimeT > timeout=std::chrono::duration< TimeRepT, TimeT >(-1))
 

Typedef Documentation

◆ WeakCallbackGroupsToNodesMap

typedef std::map<rclcpp::CallbackGroup::WeakPtr, rclcpp::node_interfaces::NodeBaseInterface::WeakPtr, std::owner_less<rclcpp::CallbackGroup::WeakPtr> > rclcpp::executors::WeakCallbackGroupsToNodesMap

Function Documentation

◆ spin_node_until_future_complete() [1/2]

template<typename FutureT , typename TimeRepT = int64_t, typename TimeT = std::milli>
rclcpp::FutureReturnCode rclcpp::executors::spin_node_until_future_complete ( rclcpp::Executor executor,
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr  node_ptr,
const FutureT &  future,
std::chrono::duration< TimeRepT, TimeT >  timeout = std::chrono::duration<TimeRepT, TimeT>(-1) 
)

Spin (blocking) until the future is complete, it times out waiting, or rclcpp is interrupted.

Parameters
[in]executorThe executor which will spin the node.
[in]node_ptrThe node to spin.
[in]futureThe future to wait on. If SUCCESS, the future is safe to access after this function
[in]timeoutOptional timeout parameter, which gets passed to Executor::spin_node_once. -1 is block forever, 0 is non-blocking. If the time spent inside the blocking loop exceeds this timeout, return a TIMEOUT return code.
Returns
The return code, one of SUCCESS, INTERRUPTED, or TIMEOUT.

◆ spin_node_until_future_complete() [2/2]

template<typename NodeT = rclcpp::Node, typename FutureT , typename TimeRepT = int64_t, typename TimeT = std::milli>
rclcpp::FutureReturnCode rclcpp::executors::spin_node_until_future_complete ( rclcpp::Executor executor,
std::shared_ptr< NodeT >  node_ptr,
const FutureT &  future,
std::chrono::duration< TimeRepT, TimeT >  timeout = std::chrono::duration<TimeRepT, TimeT>(-1) 
)