~shadowrobot/sr-ros-interface/release1.2

« back to all changes in this revision

Viewing changes to shadow_robot/cyberglove/include/cyberglove/cyberglove_service.h

  • Committer: Ugo Cupcic
  • Date: 2010-11-03 16:25:21 UTC
  • mfrom: (0.1.117 trunk)
  • Revision ID: ugo@shadowrobot.com-20101103162521-bht8o7tas3js0xiy
mergedĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @file   cyberglove_service.h
 
3
 * @author Ugo Cupcic <ugo@shadowrobot.com>, Contact <contact@shadowrobot.com>
 
4
 * @date   Thu Apr 22 10:25:55 2010
 
5
 *
 
6
 * @brief   A service which can stop / start the Cyberglove publisher.
 
7
 *
 
8
 *
 
9
 */
 
10
 
 
11
 
 
12
#ifndef         CYBERGLOVE_SERVICE_H_
 
13
# define        CYBERGLOVE_SERVICE_H_
 
14
 
 
15
#include <ros/ros.h>
 
16
#include <vector>
 
17
#include "cyberglove_publisher.h"
 
18
#include "cyberglove/Start.h"
 
19
#include "cyberglove/Calibration.h"
 
20
#include <boost/smart_ptr.hpp>
 
21
 
 
22
//messages
 
23
 
 
24
using namespace ros;
 
25
 
 
26
namespace cyberglove_service{
 
27
 
 
28
  class CybergloveService
 
29
  {
 
30
  public:
 
31
    /// Constructor
 
32
    CybergloveService(boost::shared_ptr<cyberglove_publisher::CyberglovePublisher> publish);
 
33
    ~CybergloveService(){};
 
34
 
 
35
    //CybergloveService();
 
36
    bool start(cyberglove::Start::Request &req, cyberglove::Start::Response &res);
 
37
    bool calibration(cyberglove::Calibration::Request &req, cyberglove::Calibration::Response &res);
 
38
  private:
 
39
    
 
40
    NodeHandle node;
 
41
    boost::shared_ptr<cyberglove_publisher::CyberglovePublisher> pub;
 
42
    ros::ServiceServer service_start;
 
43
    ros::ServiceServer service_calibration;
 
44
  };
 
45
 
 
46
}
 
47
#endif