icub-test
Public Member Functions
ControlModes Class Reference

The test checks if the joint is able to go in all the available control/interaction modes and if transition between the states is correct. More...

#include <ControlModes.h>

Inherits yarp::robottestingframework::TestCase.

Public Member Functions

virtual bool setup (yarp::os::Property &property)
 
virtual void tearDown ()
 
virtual void run ()
 
void goHome ()
 
void executeCmd ()
 
void setMode (int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
 
void verifyMode (int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title)
 
void verifyAmplifier (int desired_amplifier_mode, std::string title)
 
void zeroCurrentLimits ()
 
void getOriginalCurrentLimits ()
 
void resetOriginalCurrentLimits ()
 
void verifyModeSingle (int joint, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title)
 
void setModeSingle (int joint, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
 
void checkJointWithTorqueMode ()
 
void checkControlModeWithImCompliant (int desired_control_mode, std::string title)
 

Detailed Description

The test checks if the joint is able to go in all the available control/interaction modes and if transition between the states is correct.

The following control modes are test: VOCAB_CM_POSITION, VOCAB_CM_POSITION_DIRECT, VOCAB_CM_VELOCITY, VOCAB_CM_MIXED, VOCAB_CM_PWM, VOCAB_CM_IDLE, VOCAB_CM_FORCE_IDLE, VOCAB_HW_FAULT. The following interaction modes are tested: VOCAB_IM_STIFF, VOCAB_IM_COMPLIANT. For some modes (VOCAB_CM_TORQUE, VOCAB_IM_COMPLIANT) the test asks to robotInterface if the joint capabilities, skipping the test if those modes are not implemented. The test intentionally generates an hardware fault to test the transition between VOCAB_CM_HW_FAULT to VOCAB_CM_IDLE. The fault is generated by zeroing the max current limit. Check of the amplifier internal status (iAmplifier->getAmpStatus) has to be implemented yet.

Example: testRunner -v -t ControlModes.dll -p "--robot icub --part head --joints ""(0 1 2 3 4 5)"" --zero 0"

Check the following functions:

Accepts the following parameters:

Parameter name Type Units Default Value Required Description Notes
robot string - - Yes The name of the robot. e.g. icub
part string - - Yes The name of trhe robot part. e.g. left_arm

| joints | vector of ints | - | Yes | List of joints to be tested. | | | zero | double | deg | - | Yes | The home position for the tested joints. | |

Definition at line 53 of file ControlModes.h.


The documentation for this class was generated from the following files: