Public Member Functions | Private Attributes
object_manipulator::ServiceWrapper< ServiceDataType > Class Template Reference

Wrapper class for service clients to perform initialization on first use. More...

#include <service_action_wrappers.h>

List of all members.

Public Member Functions

ros::ServiceClientclient (ros::Duration timeout=ros::Duration(5.0))
 Returns reference to client. On first use, initializes (and waits for) client.
bool isInitialized () const
 ServiceWrapper (std::string service_name)
void setInterruptFunction (boost::function< bool()> f)
 Sets the interrupt function.

Private Attributes

ros::ServiceClient client_
 The actual client handle.
bool initialized_
 Has the service client been initialized or not.
boost::function< bool()> interrupt_function_
 Function used to check for interrupts.
ros::NodeHandle nh_
 The node handle to be used when initializing services.
std::string service_name_
 The name of the service.

Detailed Description

template<class ServiceDataType>
class object_manipulator::ServiceWrapper< ServiceDataType >

Wrapper class for service clients to perform initialization on first use.

When the client is first used, it will check for the existence of the service and wait until the service becomes available.

Definition at line 51 of file service_action_wrappers.h.


Constructor & Destructor Documentation

template<class ServiceDataType>
object_manipulator::ServiceWrapper< ServiceDataType >::ServiceWrapper ( std::string  service_name) [inline]

Definition at line 65 of file service_action_wrappers.h.


Member Function Documentation

template<class ServiceDataType>
ros::ServiceClient& object_manipulator::ServiceWrapper< ServiceDataType >::client ( ros::Duration  timeout = ros::Duration(5.0)) [inline]

Returns reference to client. On first use, initializes (and waits for) client.

Definition at line 74 of file service_action_wrappers.h.

template<class ServiceDataType>
bool object_manipulator::ServiceWrapper< ServiceDataType >::isInitialized ( ) const [inline]

Definition at line 97 of file service_action_wrappers.h.

template<class ServiceDataType>
void object_manipulator::ServiceWrapper< ServiceDataType >::setInterruptFunction ( boost::function< bool()>  f) [inline]

Sets the interrupt function.

Definition at line 71 of file service_action_wrappers.h.


Member Data Documentation

template<class ServiceDataType>
ros::ServiceClient object_manipulator::ServiceWrapper< ServiceDataType >::client_ [private]

The actual client handle.

Definition at line 61 of file service_action_wrappers.h.

template<class ServiceDataType>
bool object_manipulator::ServiceWrapper< ServiceDataType >::initialized_ [private]

Has the service client been initialized or not.

Definition at line 55 of file service_action_wrappers.h.

template<class ServiceDataType>
boost::function<bool()> object_manipulator::ServiceWrapper< ServiceDataType >::interrupt_function_ [private]

Function used to check for interrupts.

Definition at line 63 of file service_action_wrappers.h.

template<class ServiceDataType>
ros::NodeHandle object_manipulator::ServiceWrapper< ServiceDataType >::nh_ [private]

The node handle to be used when initializing services.

Definition at line 59 of file service_action_wrappers.h.

template<class ServiceDataType>
std::string object_manipulator::ServiceWrapper< ServiceDataType >::service_name_ [private]

The name of the service.

Definition at line 57 of file service_action_wrappers.h.


The documentation for this class was generated from the following file:


object_manipulator
Author(s): Matei Ciocarlie and Kaijen Hsiao
autogenerated on Thu Jan 2 2014 11:39:04