MoveIt Pro Behavior
Core Behaviors for MoveIt Pro
|
Provides an interface to a service client that can send a single request at a time. WARNING - This class currently does not support calling syncSendRequest function asynchronously from multiple threads. More...
#include <service_client_interface.hpp>
Public Member Functions | |
virtual | ~ClientInterfaceBase ()=default |
virtual void | initialize (const std::string &service_name, std::chrono::duration< double > wait_for_server_timeout, std::chrono::duration< double > response_timeout)=0 |
Initialize the service client. More... | |
virtual bool | waitForServiceServer () const =0 |
Block until the service server is ready or a timeout is exceeded. More... | |
virtual tl::expected< typename ServiceT::Response, std::string > | syncSendRequest (const typename ServiceT::Request &request)=0 |
Send a service request and block until the response is received or a timeout is exceeded. More... | |
virtual void | cancelRequest ()=0 |
Abort waiting on the service response future, if it has not yet been completed. More... | |
Provides an interface to a service client that can send a single request at a time. WARNING - This class currently does not support calling syncSendRequest function asynchronously from multiple threads.
|
virtualdefault |
|
pure virtual |
Abort waiting on the service response future, if it has not yet been completed.
Implemented in moveit_studio::behaviors::RclcppClientInterface< ServiceT >.
|
pure virtual |
Initialize the service client.
service_name | Service name to use when initializing the client. |
wait_for_server_timeout | Duration to wait for the service server to be available before failing. |
response_timeout | Duration to wait for a response before failing. If the duration is negative, wait forever. |
Implemented in moveit_studio::behaviors::RclcppClientInterface< ServiceT >.
|
pure virtual |
Send a service request and block until the response is received or a timeout is exceeded.
Implemented in moveit_studio::behaviors::RclcppClientInterface< ServiceT >.
|
pure virtual |
Block until the service server is ready or a timeout is exceeded.
Implemented in moveit_studio::behaviors::RclcppClientInterface< ServiceT >.