kinematics-dynamics
CentroidTransform.hpp
1 #ifndef __CENTROID_TRANSFORM_HPP__
2 #define __CENTROID_TRANSFORM_HPP__
3 
4 #include <yarp/os/Bottle.h>
5 #include <yarp/os/Stamp.h>
6 
7 #include <kdl/frames.hpp>
8 
9 #include "StreamingDevice.hpp"
10 
11 namespace roboticslab
12 {
13 
14 class StreamingDevice;
15 
22 {
23 public:
26 
28  void registerStreamingDevice(StreamingDevice * streamingDevice)
29  { this->streamingDevice = streamingDevice; }
30 
32  bool setTcpToCameraRotation(yarp::os::Bottle * b);
33 
35  void setPermanenceTime(double permanenceTime)
36  { this->permanenceTime = permanenceTime; }
37 
39  bool acceptBottle(yarp::os::Bottle * b);
40 
42  bool processStoredBottle() const;
43 
44 private:
45  StreamingDevice * streamingDevice;
46  double permanenceTime;
47  yarp::os::Bottle lastBottle;
48  yarp::os::Stamp lastAcquisition;
49  KDL::Rotation rot_tcp_camera;
50 };
51 
52 } // namespace roboticslab
53 
54 #endif // __CENTROID_TRANSFORM_HPP__
Definition: CentroidTransform.hpp:22
void setPermanenceTime(double permanenceTime)
Set new permanence time.
Definition: CentroidTransform.hpp:35
void registerStreamingDevice(StreamingDevice *streamingDevice)
Register handle to device.
Definition: CentroidTransform.hpp:28
bool setTcpToCameraRotation(yarp::os::Bottle *b)
Set TCP to camera frame.
Definition: CentroidTransform.cpp:23
bool acceptBottle(yarp::os::Bottle *b)
Register or dismiss incoming bottle.
Definition: CentroidTransform.cpp:42
CentroidTransform()
Constructor.
Definition: CentroidTransform.cpp:18
bool processStoredBottle() const
Process last stored bottle.
Definition: CentroidTransform.cpp:60
Abstract class for a YARP streaming device.
Definition: StreamingDevice.hpp:46
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:6