21 #ifndef _OPTICALENCODERSCONSISTENCY_H_
22 #define _OPTICALENCODERSCONSISTENCY_H_
25 #include <yarp/robottestingframework/TestCase.h>
26 #include <yarp/dev/ControlBoardInterfaces.h>
27 #include <yarp/dev/PolyDriver.h>
28 #include <yarp/sig/Vector.h>
29 #include <yarp/sig/Matrix.h>
85 virtual bool setup(yarp::os::Property& property);
87 virtual void tearDown();
92 void setMode(
int desired_mode);
93 void saveToFile(std::string filename, yarp::os::Bottle &b);
96 std::string getPath(
const std::string& str);
97 std::string robotName;
99 std::string plotString1;
100 std::string plotString2;
101 std::string plotString3;
102 std::string plotString4;
104 yarp::sig::Vector jointsList;
112 yarp::dev::PolyDriver *dd;
113 yarp::dev::IPositionControl *ipos;
114 yarp::dev::IControlMode *icmd;
115 yarp::dev::IInteractionMode *iimd;
116 yarp::dev::IEncoders *ienc;
117 yarp::dev::IMotorEncoders *imotenc;
118 yarp::dev::IMotor *imot;
119 yarp::dev::IRemoteVariables *ivar;
121 yarp::sig::Vector zero_vector;
122 yarp::sig::Vector enc_jnt;
123 yarp::sig::Vector enc_jnt2mot;
124 yarp::sig::Vector enc_mot;
125 yarp::sig::Vector enc_mot2jnt;
126 yarp::sig::Vector vel_jnt;
127 yarp::sig::Vector vel_jnt2mot;
128 yarp::sig::Vector vel_mot;
129 yarp::sig::Vector vel_mot2jnt;
130 yarp::sig::Vector acc_jnt;
131 yarp::sig::Vector acc_jnt2mot;
132 yarp::sig::Vector acc_mot;
133 yarp::sig::Vector acc_mot2jnt;
135 yarp::sig::Vector prev_enc_jnt;
136 yarp::sig::Vector prev_enc_jnt2mot;
137 yarp::sig::Vector prev_enc_mot;
138 yarp::sig::Vector prev_enc_mot2jnt;
139 yarp::sig::Vector prev_vel_jnt;
140 yarp::sig::Vector prev_vel_jnt2mot;
141 yarp::sig::Vector prev_vel_mot;
142 yarp::sig::Vector prev_vel_mot2jnt;
143 yarp::sig::Vector prev_acc_jnt;
144 yarp::sig::Vector prev_acc_jnt2mot;
145 yarp::sig::Vector prev_acc_mot;
146 yarp::sig::Vector prev_acc_mot2jnt;
148 yarp::sig::Vector diff_enc_jnt;
149 yarp::sig::Vector diff_enc_jnt2mot;
150 yarp::sig::Vector diff_enc_mot;
151 yarp::sig::Vector diff_enc_mot2jnt;
152 yarp::sig::Vector diff_vel_jnt;
153 yarp::sig::Vector diff_vel_jnt2mot;
154 yarp::sig::Vector diff_vel_mot;
155 yarp::sig::Vector diff_vel_mot2jnt;
156 yarp::sig::Vector diff_acc_jnt;
157 yarp::sig::Vector diff_acc_jnt2mot;
158 yarp::sig::Vector diff_acc_mot;
159 yarp::sig::Vector diff_acc_mot2jnt;
161 yarp::sig::Vector max;
162 yarp::sig::Vector min;
163 yarp::sig::Vector home;
164 yarp::sig::Vector speed;
165 yarp::sig::Vector gearbox;
167 yarp::sig::Matrix matrix_arms;
168 yarp::sig::Matrix matrix_torso;
169 yarp::sig::Matrix matrix_legs;
170 yarp::sig::Matrix matrix_head;
172 yarp::sig::Matrix matrix;
173 yarp::sig::Matrix inv_matrix;
174 yarp::sig::Matrix trasp_matrix;
175 yarp::sig::Matrix inv_trasp_matrix;
This tests checks if the motor encoder reading are consistent with the joint encoder readings.