Add wait_for_service and service_is_ready for SyncParametersClient (#356)
This commit is contained in:
parent
98dded0ba5
commit
124500511b
1 changed files with 15 additions and 0 deletions
|
@ -218,6 +218,21 @@ public:
|
||||||
return async_parameters_client_->on_parameter_event(std::forward<CallbackT>(callback));
|
return async_parameters_client_->on_parameter_event(std::forward<CallbackT>(callback));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RCLCPP_PUBLIC
|
||||||
|
bool
|
||||||
|
service_is_ready() const
|
||||||
|
{
|
||||||
|
return async_parameters_client_->service_is_ready();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename RatioT = std::milli>
|
||||||
|
bool
|
||||||
|
wait_for_service(
|
||||||
|
std::chrono::duration<int64_t, RatioT> timeout = std::chrono::duration<int64_t, RatioT>(-1))
|
||||||
|
{
|
||||||
|
return async_parameters_client_->wait_for_service(timeout);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
rclcpp::executor::Executor::SharedPtr executor_;
|
rclcpp::executor::Executor::SharedPtr executor_;
|
||||||
rclcpp::node::Node::SharedPtr node_;
|
rclcpp::node::Node::SharedPtr node_;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue