21 #ifndef _JOINTLIMITS_H_
22 #define _JOINTLIMITS_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/os/Bottle.h>
30 #include <yarp/sig/Matrix.h>
74 class JointLimits :
public yarp::robottestingframework::TestCase {
79 virtual bool setup(yarp::os::Property& property);
81 virtual void tearDown();
85 void goTo(yarp::sig::Vector position);
86 bool goToSingle(
int i,
double pos,
double *reached_pos);
87 bool goToSingleExceed(
int i,
double position_to_reach,
double limit,
double reachedLimit,
double *reached_pos);
89 void setMode(
int desired_mode);
90 void saveToFile(std::string filename, yarp::os::Bottle &b);
93 std::string robotName;
95 yarp::sig::Vector jointsList;
101 yarp::dev::PolyDriver *dd;
102 yarp::dev::IPositionControl *ipos;
103 yarp::dev::IControlMode *icmd;
104 yarp::dev::IInteractionMode *iimd;
105 yarp::dev::IEncoders *ienc;
106 yarp::dev::IControlLimits *ilim;
107 yarp::dev::IPidControl *ipid;
109 yarp::sig::Vector enc_jnt;
110 yarp::sig::Vector max_lims;
111 yarp::sig::Vector min_lims;
112 yarp::sig::Vector outputLimit;
113 yarp::sig::Vector outOfBoundPos;
114 yarp::sig::Vector toleranceList;
115 yarp::sig::Vector home;
116 yarp::sig::Vector speed;
119 yarp::dev::Pid* original_pids;
Check if the software joint limits are properly set.