kinematics-dynamics
GrabberResponder.hpp
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2 
3 #ifndef __GRABBER_RESPONDER_HPP__
4 #define __GRABBER_RESPONDER_HPP__
5 
6 #include <yarp/os/Bottle.h>
7 #include <yarp/os/PortReaderBuffer.h>
8 
9 #include "ICartesianControl.h"
10 
11 namespace roboticslab
12 {
13 
20 class GrabberResponder : public yarp::os::TypedReaderCallback<yarp::os::Bottle>
21 {
22 public:
23  GrabberResponder() : iCartesianControl(nullptr),
24  isStopped(true),
25  noApproach(false)
26  {}
27 
28  void onRead(yarp::os::Bottle &b) override;
29 
30  void setICartesianControlDriver(roboticslab::ICartesianControl *iCartesianControl)
31  {
32  this->iCartesianControl = iCartesianControl;
33  }
34 
35  void setNoApproachSetting(bool noApproach)
36  {
37  this->noApproach = noApproach;
38  }
39 
40 private:
41  roboticslab::ICartesianControl *iCartesianControl;
42 
43  bool isStopped, noApproach;
44 };
45 
46 } // namespace roboticslab
47 
48 #endif // __GRABBER_RESPONDER_HPP__
Contains roboticslab::ICartesianControl and related vocabs.
Callback class for dealing with incoming grabber data streams.
Definition: GrabberResponder.hpp:21
Abstract base class for a cartesian controller.
Definition: ICartesianControl.h:146
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:6