15 #ifndef RCLCPP__EXECUTORS_HPP_ 16 #define RCLCPP__EXECUTORS_HPP_ 34 spin_some(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr);
38 spin_some(rclcpp::node::Node::SharedPtr node_ptr);
44 spin(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr);
48 spin(rclcpp::node::Node::SharedPtr node_ptr);
68 template<
typename ResponseT,
typename TimeT = std::milli>
72 rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr,
73 std::shared_future<ResponseT> & future,
74 std::chrono::duration<int64_t, TimeT> timeout = std::chrono::duration<int64_t, TimeT>(-1))
84 template<
typename NodeT = rclcpp::node::Node,
typename ResponseT,
typename TimeT = std::milli>
88 std::shared_ptr<NodeT> node_ptr,
89 std::shared_future<ResponseT> & future,
90 std::chrono::duration<int64_t, TimeT> timeout = std::chrono::duration<int64_t, TimeT>(-1))
94 node_ptr->get_node_base_interface(),
101 template<
typename FutureT,
typename TimeT = std::milli>
104 rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr,
105 std::shared_future<FutureT> & future,
106 std::chrono::duration<int64_t, TimeT> timeout = std::chrono::duration<int64_t, TimeT>(-1))
109 return executors::spin_node_until_future_complete<FutureT>(executor, node_ptr, future, timeout);
112 template<
typename NodeT = rclcpp::node::Node,
typename FutureT,
typename TimeT = std::milli>
115 std::shared_ptr<NodeT> node_ptr,
116 std::shared_future<FutureT> & future,
117 std::chrono::duration<int64_t, TimeT> timeout = std::chrono::duration<int64_t, TimeT>(-1))
124 #endif // RCLCPP__EXECUTORS_HPP_ Single-threaded executor implementation.
Definition: single_threaded_executor.hpp:42
FutureReturnCode spin_until_future_complete(std::shared_future< ResponseT > &future, std::chrono::duration< int64_t, TimeT > timeout=std::chrono::duration< int64_t, TimeT >(-1))
Spin (blocking) until the future is complete, it times out waiting, or rclcpp is interrupted.
Definition: executor.hpp:215
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:93
rclcpp::executor::FutureReturnCode spin_until_future_complete(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr, std::shared_future< FutureT > &future, std::chrono::duration< int64_t, TimeT > timeout=std::chrono::duration< int64_t, TimeT >(-1))
Definition: executors.hpp:103
void spin_some(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr)
Create a default single-threaded executor and execute any immediately available work.
FutureReturnCode
Return codes to be used with spin_until_future_complete.
Definition: executor.hpp:55
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
Definition: multi_threaded_executor.hpp:34
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< int64_t, TimeT > timeout=std::chrono::duration< int64_t, TimeT >(-1))
Spin (blocking) until the future is complete, it times out waiting, or rclcpp is interrupted.
Definition: executors.hpp:70
void spin(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr)
Create a default single-threaded executor and spin the specified node.