![]() |
NimbRo ROS Soccer Package
|
Provides basic functionality for controlling calls to ROS services. More...
#include <ros_timing.h>
Public Member Functions | |
RosServiceCaller (double reissueDelay, double failRetryDelay) | |
Default constructor. More... | |
void | setServiceClient (const ros::ServiceClient &SC) |
Set function for the ROS ServiceClient used by this RosServiceCaller | |
bool | callService () |
Call the required service with the request data stored in the data class member. | |
bool | callService (T &srv_data) |
Call the required service with the request data stored in srv_data . | |
Public Attributes | |
T | data |
Request variable (can choose to use this instead of providing your own in the calling scope of callService() ) | |
Provides basic functionality for controlling calls to ROS services.
To use a RosServiceCaller
in your class, simply add an instance of it as a class member and provide the two delay arguments to the RosServiceCaller
constructor in the class initialiser list. From then on you can simply directly invoke callService()
whenver you need to. So in the end you'll probably have something like this:
|
inline |
Default constructor.
reissueDelay | The minimum time to wait after a successful service call before allowing attempts to call the service again. |
failRetryDelay | The minimum time to wait after an unsuccessful service call before allowing attempts to call the service again. |