icub-test
Public Member Functions
PositionControlAccuracyExernalPid Class Reference

This tests checks the response of the system to a position step, sending directly PWM commands to a joint. More...

#include <PositionControlAccuracyExternalPid.h>

Inherits yarp::robottestingframework::TestCase.

Public Member Functions

virtual bool setup (yarp::os::Property &property)
 
virtual void tearDown ()
 
virtual void run ()
 
bool goHome ()
 
void executeCmd ()
 
void setMode (int desired_mode)
 
void saveToFile (std::string filename, yarp::os::Bottle &b)
 

Detailed Description

This tests checks the response of the system to a position step, sending directly PWM commands to a joint.

The PWM commands are computed using iCub::ctrl::parallelPID class. This test currently does not return any error report. It simply moves a joint, and saves data to a different file for each joint. The data acquired can be analyzed with a Matlab script to evaluate the position PID properties. Be aware that a step greater than 5 degrees at the maximum speed can be dangerous for both the robot and the human operator!

example: testRunner -v -t PositionControlAccuracyExternalPid.dll -p "--robot icubSim --part head --joints ""(0 1 2)"" --zeros ""(0 0 0)"" --step 5 --cycles 10 --sampleTime 0.010 --Kp 1.0" example: testRunner -v -t PositionControlAccuracyExternalPid.dll -p "--robot icubSim --part head --joints ""(2)"" --zeros ""(0)"" --step 5 --cycles 10 --sampleTime 0.010 --homeTolerance 1.0 --step_duration 8 --Kp 2.2 --Kd 0.01 --Ki 100 --MaxValue 80"

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 the robot part. e.g. left_arm
joints vector of ints - - Yes List of joints to be tested
zeros double deg - Yes The home position for each joint
cycles int - - Yes Each joint will be tested multiple times
step double deg - Yes The amplitude of the step reference signal Recommended max: 5 deg!
sampleTime double s - Yes The sample time of the control thread
home_tolerance double deg 0.5 No The max acceptable position error during the homing phase.
filename string No The output filename. If not specified, the name will be generated using 'part' parameter and joint number
step_duration double s 4 No The duration of the step. After this time, a new test cycle starts.
Kp double 0 No The Proportional gain
Ki double 0 No The Integral gain
Kd double 0 No The Derivative gain
MaxValue double % 100 No max value for PID output (saturator).

Definition at line 62 of file PositionControlAccuracyExternalPid.h.


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