icub-test
Loading...
Searching...
No Matches
imu.h
1#ifndef IMU_H
2#define IMU_H
3
4#include <yarp/dev/PolyDriver.h>
5#include <yarp/dev/MultipleAnalogSensorsInterfaces.h>
6#include <yarp/dev/IPositionControl.h>
7#include <yarp/dev/IEncoders.h>
8#include <yarp/dev/IAxisInfo.h>
9#include <yarp/dev/IMultipleWrapper.h>
10#include <yarp/robottestingframework/TestCase.h>
11#include <yarp/manager/localbroker.h>
12
13#include <iDynTree/KinDynComputations.h>
14#include <iDynTree/ModelLoader.h>
15#include <iDynTree/Model.h>
16
39class Imu : public yarp::robottestingframework::TestCase {
40 public:
41 Imu();
42 virtual ~Imu();
43 virtual bool setup(yarp::os::Property& property);
44 virtual void tearDown();
45 virtual void run();
46
47 private:
48 std::string robotName;
49 std::string portName;
50 std::string modelName;
51 double errorMax;
52 yarp::os::Bottle sensorsList;
53 std::vector<std::string> partsList;
54
55 yarp::dev::PolyDriver MASclientDriver;
56 yarp::dev::PolyDriver controlBoardDriver;
57 yarp::dev::PolyDriver MASremapperDriver;
58 yarp::dev::IOrientationSensors* iorientation;
59 yarp::dev::IPositionControl* ipos;
60 yarp::dev::IEncoders* ienc;
61 yarp::dev::IAxisInfo* iaxes;
62 yarp::dev::IMultipleWrapper* imultiwrap;
63
64 yarp::os::BufferedPort <yarp::os::Bottle> outputPort;
65 std::vector<yarp::sig::Vector> rpyValues;
66 yarp::sig::Vector positions;
67 yarp::sig::Vector velocities;
68
69 int axes;
70 std::vector<std::string> axesVec;
71
72 iDynTree::ModelLoader model;
73 iDynTree::KinDynComputations kinDynComp;
74 iDynTree::VectorDynSize s;
75 iDynTree::VectorDynSize ds;
76 iDynTree::Vector3 gravity;
77 iDynTree::Rotation baseLinkOrientation;
78 iDynTree::Twist baseVelocity;
79 iDynTree::Transform I_T_base;
80 std::vector<iDynTree::Rotation> I_R_I_IMU;
81
82 robometry::BufferManager bufferManager;
83
84 bool startMove();
85 bool setupRobometry();
86 void setupBrokers();
87
88 std::vector<yarp::manager::LocalBroker> localBroker;
89 yarp::manager::LocalBroker scriptBroker;
90 std::string strCmd;
91 std::string strParam;
92};
93
94#endif //IMU_H
The purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements.
Definition imu.h:39