00001 00028 #ifndef CYBERGLOVE_SERVICE_H_ 00029 # define CYBERGLOVE_SERVICE_H_ 00030 00031 #include <ros/ros.h> 00032 #include <vector> 00033 #include "cyberglove_publisher.h" 00034 #include "cyberglove/Start.h" 00035 #include "cyberglove/Calibration.h" 00036 #include <boost/smart_ptr.hpp> 00037 00038 //messages 00039 00040 using namespace ros; 00041 00042 namespace cyberglove_service{ 00043 00044 class CybergloveService 00045 { 00046 public: 00048 CybergloveService(boost::shared_ptr<cyberglove_publisher::CyberglovePublisher> publish); 00049 ~CybergloveService(){}; 00050 00051 //CybergloveService(); 00052 bool start(cyberglove::Start::Request &req, cyberglove::Start::Response &res); 00053 bool calibration(cyberglove::Calibration::Request &req, cyberglove::Calibration::Response &res); 00054 private: 00055 00056 NodeHandle node; 00057 boost::shared_ptr<cyberglove_publisher::CyberglovePublisher> pub; 00058 ros::ServiceServer service_start; 00059 ros::ServiceServer service_calibration; 00060 }; 00061 00062 } 00063 #endif