|
void | advertiseService (const ros::NodeHandlePtr &node_handle) |
| Advertises the ROS service given a node handle. More...
|
|
template<class MReq , class MRes > |
LazyAcquirer | makeLazyAcquirer (const std::string &service, const ServiceCallback< MReq &, MRes & > &callback, const ros::VoidConstPtr &tracked_object=ros::VoidConstPtr()) const |
| Creates a function that advertises a ROS service when called. More...
|
|
template<class ServiceEvent > |
LazyAcquirer | makeLazyAcquirer (const std::string &service, const ServiceCallback< ServiceEvent & > &callback, const ros::VoidConstPtr &tracked_object=ros::VoidConstPtr()) const |
| Creates a function that advertises a ROS service when called. More...
|
|
template<class T , class MReq , class MRes > |
LazyAcquirer | makeLazyAcquirer (const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj) const |
| Creates a function that advertises a ROS service when called. More...
|
|
template<class T , class MReq , class MRes > |
LazyAcquirer | makeLazyAcquirer (const std::string &service, bool(T::*srv_func)(ros::ServiceEvent< MReq, MRes > &), T *obj) const |
| Creates a function that advertises a ROS service when called. More...
|
|
template<class T , class MReq , class MRes > |
LazyAcquirer | makeLazyAcquirer (const std::string &service, bool(T::*srv_func)(MReq &, MRes &), const boost::shared_ptr< T > &obj) const |
| Creates a function that advertises a ROS service when called. More...
|
|
template<class T , class MReq , class MRes > |
LazyAcquirer | makeLazyAcquirer (const std::string &service, bool(T::*srv_func)(ros::ServiceEvent< MReq, MRes > &), const boost::shared_ptr< T > &obj) const |
| Creates a function that advertises a ROS service when called. More...
|
|
template<class MReq , class MRes > |
LazyAcquirer | makeLazyAcquirer (const std::string &service, bool(*srv_func)(MReq &, MRes &)) const |
| Creates a function that advertises a ROS service when called. More...
|
|
template<class MReq , class MRes > |
LazyAcquirer | makeLazyAcquirer (const std::string &service, bool(*srv_func)(ros::ServiceEvent< MReq, MRes > &)) const |
| Creates a function that advertises a ROS service when called. More...
|
|
void | shutdown () |
| Shutdowns the ROS service. More...
|
|
void | acquire (const ros::NodeHandlePtr &node_handle) |
| Acquires the resource if it's not already acquired. More...
|
|
| Managed ()=delete |
| Default empty constructor is deleted. More...
|
|
| Managed (Args &&...args) |
| Variadic constructor. More...
|
|
void | pause () |
| Pauses the resource. More...
|
|
void | release () |
| Releases the resource if it's already acquired. shutdown() method in case of ros::Subscriber and ros::ServiceServer. More...
|
|
void | resume () |
| Resumes the resource. More...
|
|
| ~Managed () |
| Destructor. More...
|
|
Implementation of Managed class for ros::ServiceServer.
Adds additional functionality to ros::ServiceServer resource by wrapping it. The service server can be shutdowned, advertised and paused. Shutting down has the same effect as in ROS, while advertising does not require any arguments, since they are passed in the inherited constructor. Pausing the service, will cause the callback to return false immediately.
Definition at line 71 of file managed_serviceserver.h.
template<class MReq , class MRes >
Creates a function that advertises a ROS service when called.
Returns a lambda, which given a node handle will advertise the ROS service. This lambda is called during advertiseService call and the result is assigned as the managed resource, which in this case is ros::ServiceServer
- Parameters
-
service | Name of the service to be advertised |
callback | Service callback specified as boost::function accepting two arguments |
tracked_object | Object to be tracked, whose destruction will terminate the service |
- Template Parameters
-
MReq | Service callback's message request type |
MRes | Service callback's message response type |
- Returns
- Lambda, which return a ros::ServiceServer
Definition at line 142 of file managed_serviceserver.h.
template<class ServiceEvent >
Creates a function that advertises a ROS service when called.
Returns a lambda, which given a node handle will advertise the ROS service. This lambda is called during advertiseService call and the result is assigned as the managed resource, which in this case is ros::ServiceServer
- Parameters
-
service | Name of the service to be advertised |
callback | Service callback specified as boost::function accepting one argument |
tracked_object | Object to be tracked, whose destruction will terminate the service |
- Template Parameters
-
ServiceEvent | Service callback's event message type |
- Returns
- Lambda, which return a ros::ServiceServer
Definition at line 173 of file managed_serviceserver.h.
template<class T , class MReq , class MRes >
LazyAcquirer robot_activity::resource::ManagedServiceServer::makeLazyAcquirer |
( |
const std::string & |
service, |
|
|
bool(T::*)(MReq &, MRes &) |
srv_func, |
|
|
T * |
obj |
|
) |
| const |
|
inline |
Creates a function that advertises a ROS service when called.
Returns a lambda, which given a node handle will advertise the ROS service. This lambda is called during advertiseService call and the result is assigned as the managed resource, which in this case is ros::ServiceServer
- Parameters
-
service | Name of the service to be advertised |
srv_func | Pointer to a member function of class T, which accepts two arguments: message request and response and returns a bool |
obj | Object to be used when calling the pointed function |
- Template Parameters
-
T | Class, where the member function is defined |
MReq | Service callback's message request type |
MRes | Service callback's message response type |
- Returns
- Lambda, which return a ros::ServiceServer
Definition at line 206 of file managed_serviceserver.h.
template<class T , class MReq , class MRes >
LazyAcquirer robot_activity::resource::ManagedServiceServer::makeLazyAcquirer |
( |
const std::string & |
service, |
|
|
bool(T::*)(ros::ServiceEvent< MReq, MRes > &) |
srv_func, |
|
|
T * |
obj |
|
) |
| const |
|
inline |
Creates a function that advertises a ROS service when called.
Returns a lambda, which given a node handle will advertise the ROS service. This lambda is called during advertiseService call and the result is assigned as the managed resource, which in this case is ros::ServiceServer
- Parameters
-
service | Name of the service to be advertised |
srv_func | Pointer to a member function of class T, which accepts one argument: service event and returns a bool |
obj | Raw pointer to the object to be used when calling the pointed function |
- Template Parameters
-
T | Class, where the member function is defined |
MReq | Service callback's message request type |
MRes | Service callback's message response type |
- Returns
- Lambda, which return a ros::ServiceServer
Definition at line 233 of file managed_serviceserver.h.
template<class T , class MReq , class MRes >
LazyAcquirer robot_activity::resource::ManagedServiceServer::makeLazyAcquirer |
( |
const std::string & |
service, |
|
|
bool(T::*)(MReq &, MRes &) |
srv_func, |
|
|
const boost::shared_ptr< T > & |
obj |
|
) |
| const |
|
inline |
Creates a function that advertises a ROS service when called.
Returns a lambda, which given a node handle will advertise the ROS service. This lambda is called during advertiseService call and the result is assigned as the managed resource, which in this case is ros::ServiceServer
- Parameters
-
service | Name of the service to be advertised |
srv_func | Pointer to a member function of class T, which accepts two arguments: message request and response and returns a bool |
obj | boost::shared_ptr to the object to be used when calling the pointed function, it will also be treated as the tracked object, whose destruction will trigger a service shutdown |
- Template Parameters
-
T | Class, where the the member function is defined |
MReq | Service callback's message request type |
MRes | Service callback's message response type |
- Returns
- Lambda, which return a ros::ServiceServer
Definition at line 263 of file managed_serviceserver.h.
template<class T , class MReq , class MRes >
Creates a function that advertises a ROS service when called.
Returns a lambda, which given a node handle will advertise the ROS service. This lambda is called during advertiseService call and the result is assigned as the managed resource, which in this case is ros::ServiceServer
- Parameters
-
service | Name of the service to be advertised |
srv_func | Pointer to a member function of class T, which accepts one argument: a service event and returns a bool |
obj | boost::shared_ptr to the object to be used when calling the pointed function, it will also be treated as the tracked object, whose destruction will trigger a service shutdown |
- Template Parameters
-
T | Class, where the the member function is defined |
MReq | Service callback's message request type |
MRes | Service callback's message response type |
- Returns
- Lambda, which return a ros::ServiceServer
Definition at line 292 of file managed_serviceserver.h.
template<class MReq , class MRes >
LazyAcquirer robot_activity::resource::ManagedServiceServer::makeLazyAcquirer |
( |
const std::string & |
service, |
|
|
bool(*)(MReq &, MRes &) |
srv_func |
|
) |
| const |
|
inline |
Creates a function that advertises a ROS service when called.
Returns a lambda, which given a node handle will advertise the ROS service. This lambda is called during advertiseService call and the result is assigned as the managed resource, which in this case is ros::ServiceServer
- Parameters
-
service | Name of the service to be advertised |
srv_func | Pointer to a function, which accepts two arguments: message request and response and returns a bool |
- Template Parameters
-
MReq | Service callback's message request type |
MRes | Service callback's message response type |
- Returns
- Lambda, which return a ros::ServiceServer
Definition at line 318 of file managed_serviceserver.h.
template<class MReq , class MRes >
LazyAcquirer robot_activity::resource::ManagedServiceServer::makeLazyAcquirer |
( |
const std::string & |
service, |
|
|
bool(*)(ros::ServiceEvent< MReq, MRes > &) |
srv_func |
|
) |
| const |
|
inline |
Creates a function that advertises a ROS service when called.
Returns a lambda, which given a node handle will advertise the ROS service. This lambda is called during advertiseService call and the result is assigned as the managed resource, which in this case is ros::ServiceServer
- Parameters
-
service | Name of the service to be advertised |
srv_func | Pointer to a function, which accepts one argument: service event and returns a bool |
- Template Parameters
-
MReq | Service callback's message request type |
MRes | Service callback's message response type |
- Returns
- Lambda, which return a ros::ServiceServer
Definition at line 341 of file managed_serviceserver.h.