15 #ifndef RCLCPP__EXECUTORS_HPP_ 16 #define RCLCPP__EXECUTORS_HPP_ 34 spin_some(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr);
44 spin(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr);
68 template<
typename ResponseT,
typename TimeRepT =
int64_t,
typename TimeT = std::milli>
72 rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr,
84 template<
typename NodeT =
rclcpp::Node,
typename ResponseT,
typename TimeRepT = int64_t,
95 node_ptr->get_node_base_interface(),
102 template<
typename FutureT,
typename TimeRepT =
int64_t,
typename TimeT = std::milli>
105 rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr,
110 return executors::spin_node_until_future_complete<FutureT>(executor, node_ptr, future, timeout);
113 template<
typename NodeT =
rclcpp::Node,
typename FutureT,
typename TimeRepT = int64_t,
126 #endif // RCLCPP__EXECUTORS_HPP_
rclcpp::executor::FutureReturnCode spin_node_until_future_complete(rclcpp::executor::Executor &executor, rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr, std::shared_future< ResponseT > &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.
Definition: executors.hpp:70
FutureReturnCode spin_until_future_complete(std::shared_future< ResponseT > &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.
Definition: executor.hpp:225
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
virtual void remove_node(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr, bool notify=true)
Remove a node from the executor.
virtual void add_node(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr, bool notify=true)
Add a node to the executor.
Coordinate the order and timing of available communication tasks.
Definition: executor.hpp:97
void spin_some(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr)
Create a default single-threaded executor and execute any immediately available work.
Definition: multi_threaded_executor.hpp:35
FutureReturnCode
Return codes to be used with spin_until_future_complete.
Definition: executor.hpp:55
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
Set the data type used in the intra-process buffer as std::shared_ptr<MessageT>
Single-threaded executor implementation.
Definition: single_threaded_executor.hpp:40
Node is the single point of entry for creating publishers and subscribers.
Definition: node.hpp:72
void spin(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr)
Create a default single-threaded executor and spin the specified node.
rclcpp::executor::FutureReturnCode spin_until_future_complete(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr, std::shared_future< FutureT > &future, std::chrono::duration< TimeRepT, TimeT > timeout=std::chrono::duration< TimeRepT, TimeT >(-1))
Definition: executors.hpp:104