21 #ifndef _CONTROLMODES_H_
22 #define _CONTROLMODES_H_
25 #include <yarp/robottestingframework/TestCase.h>
26 #include <yarp/dev/ControlBoardInterfaces.h>
27 #include <yarp/dev/PolyDriver.h>
53 class ControlModes :
public yarp::robottestingframework::TestCase {
58 virtual bool setup(yarp::os::Property& property);
60 virtual void tearDown();
66 void setMode(
int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode);
67 void verifyMode(
int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title);
68 void verifyAmplifier(
int desired_amplifier_mode, std::string title);
70 void zeroCurrentLimits();
71 void getOriginalCurrentLimits();
72 void resetOriginalCurrentLimits();
73 void verifyModeSingle(
int joint,
int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title);
74 void setModeSingle(
int joint,
int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode);
75 void checkJointWithTorqueMode();
76 void checkControlModeWithImCompliant(
int desired_control_mode, std::string title);
79 std::string robotName;
82 int* jointTorqueCtrlEnabled;
95 yarp::dev::PolyDriver *dd;
96 yarp::dev::IPositionControl *ipos;
97 yarp::dev::IAmplifierControl *iamp;
98 yarp::dev::IControlMode *icmd;
99 yarp::dev::IInteractionMode *iimd;
100 yarp::dev::IEncoders *ienc;
101 yarp::dev::IPositionDirect *idir;
102 yarp::dev::IVelocityControl *ivel;
103 yarp::dev::ITorqueControl *itrq;
104 yarp::dev::IRemoteVariables *ivar;
110 double prevcurr_single;
111 double* prevcurr_tot;
112 double* prevcurr_some;
The test checks if the joint is able to go in all the available control/interaction modes and if tran...