humotion / examples / yarp_icub / include / icub_data_receiver.h @ 6e23ab1a
History | View | Annotate | Download (1.12 KB)
1 |
#pragma once
|
---|---|
2 |
#include <humotion/server/joint_interface.h> |
3 |
#include <boost/bimap.hpp> |
4 |
#include <yarp/dev/PolyDriver.h> |
5 |
#include <yarp/dev/IControlLimits2.h> |
6 |
#include <yarp/dev/ControlBoardInterfaces.h> |
7 |
#include <yarp/os/Time.h> |
8 |
#include <yarp/sig/Vector.h> |
9 |
#include "icub_jointinterface.h" |
10 |
#include <humotion/server/server.h> |
11 |
#include <yarp/os/Network.h> |
12 |
#include <yarp/os/RateThread.h> |
13 |
#include <yarp/os/Time.h> |
14 |
#include <yarp/os/Property.h> |
15 |
#include <yarp/dev/ControlBoardInterfaces.h> |
16 |
#include "icub_jointinterface.h" |
17 |
|
18 |
//forward declaration to solve loop
|
19 |
class iCubJointInterface; |
20 |
|
21 |
class iCubDataReceiver : public yarp::os::RateThread{ |
22 |
public:
|
23 |
iCubDataReceiver(int period, iCubJointInterface *icub_jointinterface);
|
24 |
bool threadInit();
|
25 |
void threadRelease();
|
26 |
void run();
|
27 |
private:
|
28 |
void store_incoming_position(int icub_id, double value, double timestamp); |
29 |
|
30 |
float target_eye_pan_;
|
31 |
float target_eye_vergence_;
|
32 |
|
33 |
yarp::sig::Vector yarp_positions_; |
34 |
yarp::sig::Vector yarp_commands_; |
35 |
yarp::sig::Vector yarp_timestamps_; |
36 |
|
37 |
iCubJointInterface *icub_jointinterface_; |
38 |
yarp::dev::IEncodersTimed *yarp_iencs_; |
39 |
}; |
40 |
|