-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCentroidTransform.hpp
54 lines (40 loc) · 1.15 KB
/
CentroidTransform.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef __CENTROID_TRANSFORM_HPP__
#define __CENTROID_TRANSFORM_HPP__
#include <yarp/os/Bottle.h>
#include <yarp/os/Stamp.h>
#include <kdl/frames.hpp>
#include "StreamingDevice.hpp"
namespace roboticslab
{
class StreamingDevice;
/**
* @ingroup streamingDeviceController
*
* @see @cite eona2020icarsc
*/
class CentroidTransform
{
public:
//! Constructor
CentroidTransform();
//! Register handle to device
void registerStreamingDevice(StreamingDevice * streamingDevice)
{ this->streamingDevice = streamingDevice; }
//! Set TCP to camera frame
bool setTcpToCameraRotation(yarp::os::Bottle * b);
//! Set new permanence time
void setPermanenceTime(double permanenceTime)
{ this->permanenceTime = permanenceTime; }
//! Register or dismiss incoming bottle
bool acceptBottle(yarp::os::Bottle * b);
//! Process last stored bottle
bool processStoredBottle() const;
private:
StreamingDevice * streamingDevice;
double permanenceTime;
yarp::os::Bottle lastBottle;
yarp::os::Stamp lastAcquisition;
KDL::Rotation rot_tcp_camera;
};
} // namespace roboticslab
#endif // __CENTROID_TRANSFORM_HPP__