WaitForServiceAvailable Class
Waits until a ROS service has at least one server, so an Objective can check a required node is running before it starts work that depends on that node. More...
Declaration
class moveit_pro::behaviors::WaitForServiceAvailable { ... }
#include <wait_for_service_available.hpp>
Base class
Public Constructors Index
| WaitForServiceAvailable (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
|
|
|
Public Member Functions Index
| BT::NodeStatus | onStart () override |
|
Reads and validates the ports, then checks the ROS graph once. More...
|
|
| BT::NodeStatus | onRunning () override |
|
Checks the ROS graph, and fails once the timeout has passed with no server. More...
|
|
| void | onHalted () override |
|
|
|
Private Member Functions Index
| BT::NodeStatus | check () |
|
Returns SUCCESS when the service has a server, FAILURE when the deadline has passed, else RUNNING. More...
|
|
Private Member Attributes Index
Public Static Functions Index
Description
Waits until a ROS service has at least one server, so an Objective can check a required node is running before it starts work that depends on that node.
Checks the ROS graph for a server of service_name on every tick, without calling the service, so it works for any service type. Returns SUCCESS as soon as a server exists and RUNNING until then. Returns FAILURE when no server appears within timeout seconds, when a port is missing, when service_name is empty, or when timeout is negative or not finite. A timeout of 0 checks once.
| Data Port Name | Port Type | Object Type |
|---|
| service_name | input | std::string |
| timeout | input | double |
Definition at line 32 of file wait_for_service_available.hpp.
Public Constructors
WaitForServiceAvailable()
| moveit_pro::behaviors::WaitForServiceAvailable::WaitForServiceAvailable (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources) |
|
Public Member Functions
onHalted()
| void moveit_pro::behaviors::WaitForServiceAvailable::onHalted () |
|
onRunning()
| BT::NodeStatus moveit_pro::behaviors::WaitForServiceAvailable::onRunning () |
|
onStart()
| BT::NodeStatus moveit_pro::behaviors::WaitForServiceAvailable::onStart () |
|
Private Member Functions
check()
| BT::NodeStatus moveit_pro::behaviors::WaitForServiceAvailable::check () |
|
Private Member Attributes
service_name_
| std::string moveit_pro::behaviors::WaitForServiceAvailable::service_name_ |
|
started_at_
| std::chrono::steady_clock::time_point moveit_pro::behaviors::WaitForServiceAvailable::started_at_ |
|
timeout_seconds_
| double moveit_pro::behaviors::WaitForServiceAvailable::timeout_seconds_ = 0.0 |
|
Public Static Functions
metadata()
| BT::KeyValueVector moveit_pro::behaviors::WaitForServiceAvailable::metadata () |
|
static
|
providedPorts()
| BT::PortsList moveit_pro::behaviors::WaitForServiceAvailable::providedPorts () |
|
static
|
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.15.0.