Revision ea7a702d
examples/yarp_icub/include/icub_data_receiver.h | ||
---|---|---|
20 | 20 |
|
21 | 21 |
class iCubDataReceiver : public yarp::os::RateThread{ |
22 | 22 |
public: |
23 |
iCubDataReceiver(int period, yarp::dev::IEncoders *_iencs, iCubJointInterface *_icub_jointinterface); |
|
23 |
iCubDataReceiver(int period, yarp::dev::IEncodersTimed *_iencs, iCubJointInterface *_icub_jointinterface);
|
|
24 | 24 |
bool threadInit(); |
25 | 25 |
void threadRelease(); |
26 | 26 |
void run(); |
... | ... | |
30 | 30 |
yarp::sig::Vector positions; |
31 | 31 |
yarp::sig::Vector velocities; |
32 | 32 |
yarp::sig::Vector commands; |
33 |
yarp::sig::Vector timestamps; |
|
33 | 34 |
|
34 |
yarp::dev::IEncoders *iencs; |
|
35 |
yarp::dev::IEncodersTimed *iencs;
|
|
35 | 36 |
iCubJointInterface *icub_jointinterface; |
36 | 37 |
}; |
37 | 38 |
|
examples/yarp_icub/include/icub_jointinterface.h | ||
---|---|---|
2 | 2 |
#include <humotion/server/joint_interface.h> |
3 | 3 |
#include <boost/bimap.hpp> |
4 | 4 |
#include <yarp/dev/PolyDriver.h> |
5 |
#include <yarp/dev/IControlMode.h> |
|
5 | 6 |
#include <yarp/dev/IControlLimits2.h> |
6 | 7 |
#include <yarp/dev/ControlBoardInterfaces.h> |
7 | 8 |
#include <yarp/os/Time.h> |
... | ... | |
37 | 38 |
ICUB_ID_EYES_PAN = 4, |
38 | 39 |
ICUB_ID_EYES_VERGENCE = 5, |
39 | 40 |
//the following ids are used for remapping: |
40 |
ICUB_ID_EYES_LEFT_LR, |
|
41 |
ICUB_ID_EYES_RIGHT_LR, |
|
41 |
//ICUB_ID_EYES_LEFT_LR,
|
|
42 |
//ICUB_ID_EYES_RIGHT_LR,
|
|
42 | 43 |
ICUB_ID_EYES_LEFT_LID_LOWER, |
43 | 44 |
ICUB_ID_EYES_LEFT_LID_UPPER, |
44 | 45 |
ICUB_ID_EYES_RIGHT_LID_LOWER, |
... | ... | |
63 | 64 |
void execute_motion(); |
64 | 65 |
|
65 | 66 |
private: |
67 |
void set_joint_enable_state(int e, bool enabled); |
|
66 | 68 |
double get_timestamp_ms(); |
67 | 69 |
double target_angle[ICUB_JOINT_ID_ENUM_SIZE]; |
68 | 70 |
double target_angle_previous[ICUB_JOINT_ID_ENUM_SIZE]; |
... | ... | |
87 | 89 |
|
88 | 90 |
yarp::dev::IVelocityControl *ivel; |
89 | 91 |
yarp::dev::IPositionControl *ipos; |
90 |
yarp::dev::IEncoders *iencs; |
|
92 |
yarp::dev::IEncodersTimed *iencs;
|
|
91 | 93 |
yarp::dev::IControlLimits *ilimits; |
94 |
yarp::dev::IAmplifierControl *amp; |
|
95 |
yarp::dev::IPidControl *pid; |
|
96 |
yarp::dev::IControlMode *icontrol; |
|
92 | 97 |
|
93 | 98 |
void store_min_max(yarp::dev::IControlLimits *ilimits, int id, int e); |
94 | 99 |
|
Also available in: Unified diff