|
icub-test
|
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) |
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.
| ControlModes::ControlModes | ( | ) |
Definition at line 37 of file ControlModes.cpp.
|
virtual |
Definition at line 55 of file ControlModes.cpp.
| void ControlModes::checkControlModeWithImCompliant | ( | int | desired_control_mode, |
| std::string | title | ||
| ) |
Definition at line 373 of file ControlModes.cpp.
| void ControlModes::checkJointWithTorqueMode | ( | ) |
Definition at line 264 of file ControlModes.cpp.
| void ControlModes::executeCmd | ( | ) |
Definition at line 314 of file ControlModes.cpp.
| void ControlModes::getOriginalCurrentLimits | ( | ) |
Definition at line 139 of file ControlModes.cpp.
| void ControlModes::goHome | ( | ) |
Definition at line 345 of file ControlModes.cpp.
| void ControlModes::resetOriginalCurrentLimits | ( | ) |
Definition at line 152 of file ControlModes.cpp.
|
virtual |
Definition at line 393 of file ControlModes.cpp.
| void ControlModes::setMode | ( | int | desired_control_mode, |
| yarp::dev::InteractionModeEnum | desired_interaction_mode | ||
| ) |
Definition at line 191 of file ControlModes.cpp.
| void ControlModes::setModeSingle | ( | int | joint, |
| int | desired_control_mode, | ||
| yarp::dev::InteractionModeEnum | desired_interaction_mode | ||
| ) |
Definition at line 199 of file ControlModes.cpp.
|
virtual |
Definition at line 57 of file ControlModes.cpp.
|
virtual |
Definition at line 133 of file ControlModes.cpp.
| void ControlModes::verifyAmplifier | ( | int | desired_amplifier_mode, |
| std::string | title | ||
| ) |
Definition at line 283 of file ControlModes.cpp.
| void ControlModes::verifyMode | ( | int | desired_control_mode, |
| yarp::dev::InteractionModeEnum | desired_interaction_mode, | ||
| std::string | title | ||
| ) |
Definition at line 206 of file ControlModes.cpp.
| void ControlModes::verifyModeSingle | ( | int | joint, |
| int | desired_control_mode, | ||
| yarp::dev::InteractionModeEnum | desired_interaction_mode, | ||
| std::string | title | ||
| ) |
Definition at line 236 of file ControlModes.cpp.
| void ControlModes::zeroCurrentLimits | ( | ) |
Definition at line 161 of file ControlModes.cpp.