iCub-main
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
iCub::ctrl::OnlineStictionEstimator Class Reference

Online Stiction Estimator. More...

#include <tuning.h>

+ Inheritance diagram for iCub::ctrl::OnlineStictionEstimator:

Public Member Functions

 OnlineStictionEstimator ()
 Default constructor. More...
 
virtual bool configure (yarp::dev::PolyDriver &driver, const yarp::os::Property &options)
 Configure the estimation. More...
 
virtual bool reconfigure (const yarp::os::Property &options)
 Reconfigure the estimation after first initialization. More...
 
virtual bool isConfigured () const
 Check the configuration status. More...
 
virtual bool startEstimation ()
 Start off the estimation procedure. More...
 
virtual bool isDone ()
 Check the current estimation status. More...
 
virtual bool waitUntilDone ()
 Wait until the condition |e_mean|<e_thres is met. More...
 
virtual void stopEstimation ()
 Stop the estimation procedure. More...
 
virtual bool getResults (yarp::sig::Vector &results)
 Retrieve the estimation. More...
 
virtual bool getInfo (yarp::os::Property &info)
 Retrieve useful information about the estimation experiment. More...
 
virtual ~OnlineStictionEstimator ()
 Destructor. More...
 

Protected Types

enum  {
  rising,
  falling
}
 

Protected Member Functions

void applyStictionLimit ()
 
bool threadInit ()
 
void run ()
 
void threadRelease ()
 
bool start ()
 
void stop ()
 

Protected Attributes

yarp::dev::IControlMode * imod
 
yarp::dev::IControlLimits * ilim
 
yarp::dev::IEncoders * ienc
 
yarp::dev::IPidControl * ipid
 
yarp::dev::IPWMControl * ipwm
 
yarp::dev::ICurrentControl * icur
 
std::mutex mtx
 
std::mutex mtx_doneEvent
 
std::condition_variable cv_doneEvent
 
yarp::sig::Vector gamma
 
yarp::sig::Vector stiction
 
yarp::os::Property info
 
yarp::sig::Vector done
 
AWLinEstimator velEst
 
AWQuadEstimator accEst
 
parallelPIDpid
 
Integrator intErr
 
minJerkTrajGen trajGen
 
int joint
 
double dpos_dV
 
double t0
 
double T
 
double x_min
 
double x_max
 
double x_pos
 
double x_vel
 
double x_acc
 
double Kp
 
double Ki
 
double Kd
 
double vel_thres
 
double e_thres
 
double tg
 
double xd_pos
 
double stiction_limit
 
bool adapt
 
bool adaptOld
 
bool configured
 
enum iCub::ctrl::OnlineStictionEstimator:: { ... }  state
 

Detailed Description

Online Stiction Estimator.

Estimate the up and down stiction values.
During the experiment, the joint is controlled by a high-level pid controller that commands directly the voltage in order to track a time varying reference position. The stiction values are estimated during the rising and falling edge transitions.

Definition at line 155 of file tuning.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
rising 
falling 

Definition at line 191 of file tuning.h.

Constructor & Destructor Documentation

◆ OnlineStictionEstimator()

OnlineStictionEstimator::OnlineStictionEstimator ( )

Default constructor.

Definition at line 135 of file tuning.cpp.

◆ ~OnlineStictionEstimator()

virtual iCub::ctrl::OnlineStictionEstimator::~OnlineStictionEstimator ( )
inlinevirtual

Destructor.

Definition at line 327 of file tuning.h.

Member Function Documentation

◆ applyStictionLimit()

void OnlineStictionEstimator::applyStictionLimit ( )
protected

Definition at line 255 of file tuning.cpp.

◆ configure()

bool OnlineStictionEstimator::configure ( yarp::dev::PolyDriver &  driver,
const yarp::os::Property &  options 
)
virtual

Configure the estimation.

Parameters
driverthe device driver to control the robot part.
optionsthe configuration options.

Available options are:

joint <int>: specify the joint to be controlled.

Ts <double>: specify the estimator sample time given in seconds.

T <double>: specify the period in seconds of the reference waveform used for tracking.

Kp <double>: specify the proportional term of the high-level controller for tracking purpose.

Ki <double>: specify the integral term of the high-level controller for tracking purpose.

Kd <double>: specify the derivative term of the high-level controller for tracking purpose.

vel_thres <double>: specify the velocity threshold (in degrees) used to identify the estimation time windows. The estimation is carried out whenever |vel|<vel_thres.

e_thres <double>: specify the error threshold (in degrees) above which keep updating the stiction values. The estimation is carried out until |e_mean|>e_thres, where e_mean accounts for the integral average of the error computed within the estimation time window. Value given in degrees.

gamma (<double> <double>): specify the gains used for updating the stiction up and down values, respectively.

stiction (<double> <double>): specify the initial stiction up and down values, respectively.

Returns
true/false on success/failure.

Definition at line 150 of file tuning.cpp.

◆ getInfo()

bool OnlineStictionEstimator::getInfo ( yarp::os::Property &  info)
virtual

Retrieve useful information about the estimation experiment.

Parameters
infothe property containing the info. Available info are: (voltage <double>) which specifies the commanded voltage; (reference <double>) which specifies the position reference; (position <double>) which specifies the actual encoder value.
Returns
true/false on success/failure.

Definition at line 430 of file tuning.cpp.

◆ getResults()

bool OnlineStictionEstimator::getResults ( yarp::sig::Vector &  results)
virtual

Retrieve the estimation.

Parameters
resultsCurrent up and down stiction values given as components of a 2x1 vector.
Returns
true/false on success/failure.

Definition at line 418 of file tuning.cpp.

◆ isConfigured()

virtual bool iCub::ctrl::OnlineStictionEstimator::isConfigured ( ) const
inlinevirtual

Check the configuration status.

Returns
true iff configured successfully.

Definition at line 271 of file tuning.h.

◆ isDone()

bool OnlineStictionEstimator::isDone ( )
virtual

Check the current estimation status.

Returns
true when |e_mean|<e_thres.

Definition at line 393 of file tuning.cpp.

◆ reconfigure()

bool OnlineStictionEstimator::reconfigure ( const yarp::os::Property &  options)
virtual

Reconfigure the estimation after first initialization.

Parameters
optionsthe configuration options.
Returns
true/false on success/failure.

Definition at line 199 of file tuning.cpp.

◆ run()

void OnlineStictionEstimator::run ( )
protected

Definition at line 315 of file tuning.cpp.

◆ start()

bool iCub::ctrl::OnlineStictionEstimator::start ( )
protected

◆ startEstimation()

virtual bool iCub::ctrl::OnlineStictionEstimator::startEstimation ( )
inlinevirtual

Start off the estimation procedure.

Returns
true iff started successfully.

Definition at line 278 of file tuning.h.

◆ stop()

void iCub::ctrl::OnlineStictionEstimator::stop ( )
protected

◆ stopEstimation()

virtual void iCub::ctrl::OnlineStictionEstimator::stopEstimation ( )
inlinevirtual

Stop the estimation procedure.

Definition at line 298 of file tuning.h.

◆ threadInit()

bool OnlineStictionEstimator::threadInit ( )
protected

Definition at line 263 of file tuning.cpp.

◆ threadRelease()

void OnlineStictionEstimator::threadRelease ( )
protected

Definition at line 382 of file tuning.cpp.

◆ waitUntilDone()

bool OnlineStictionEstimator::waitUntilDone ( )
virtual

Wait until the condition |e_mean|<e_thres is met.

Returns
true iff the condition is met, false if the process is stopped before.

Definition at line 405 of file tuning.cpp.

Member Data Documentation

◆ accEst

AWQuadEstimator iCub::ctrl::OnlineStictionEstimator::accEst
protected

Definition at line 174 of file tuning.h.

◆ adapt

bool iCub::ctrl::OnlineStictionEstimator::adapt
protected

Definition at line 188 of file tuning.h.

◆ adaptOld

bool iCub::ctrl::OnlineStictionEstimator::adaptOld
protected

Definition at line 188 of file tuning.h.

◆ configured

bool iCub::ctrl::OnlineStictionEstimator::configured
protected

Definition at line 189 of file tuning.h.

◆ cv_doneEvent

std::condition_variable iCub::ctrl::OnlineStictionEstimator::cv_doneEvent
protected

Definition at line 167 of file tuning.h.

◆ done

yarp::sig::Vector iCub::ctrl::OnlineStictionEstimator::done
protected

Definition at line 171 of file tuning.h.

◆ dpos_dV

double iCub::ctrl::OnlineStictionEstimator::dpos_dV
protected

Definition at line 180 of file tuning.h.

◆ e_thres

double iCub::ctrl::OnlineStictionEstimator::e_thres
protected

Definition at line 185 of file tuning.h.

◆ gamma

yarp::sig::Vector iCub::ctrl::OnlineStictionEstimator::gamma
protected

Definition at line 168 of file tuning.h.

◆ icur

yarp::dev::ICurrentControl* iCub::ctrl::OnlineStictionEstimator::icur
protected

Definition at line 163 of file tuning.h.

◆ ienc

yarp::dev::IEncoders* iCub::ctrl::OnlineStictionEstimator::ienc
protected

Definition at line 160 of file tuning.h.

◆ ilim

yarp::dev::IControlLimits* iCub::ctrl::OnlineStictionEstimator::ilim
protected

Definition at line 159 of file tuning.h.

◆ imod

yarp::dev::IControlMode* iCub::ctrl::OnlineStictionEstimator::imod
protected

Definition at line 158 of file tuning.h.

◆ info

yarp::os::Property iCub::ctrl::OnlineStictionEstimator::info
protected

Definition at line 170 of file tuning.h.

◆ intErr

Integrator iCub::ctrl::OnlineStictionEstimator::intErr
protected

Definition at line 176 of file tuning.h.

◆ ipid

yarp::dev::IPidControl* iCub::ctrl::OnlineStictionEstimator::ipid
protected

Definition at line 161 of file tuning.h.

◆ ipwm

yarp::dev::IPWMControl* iCub::ctrl::OnlineStictionEstimator::ipwm
protected

Definition at line 162 of file tuning.h.

◆ joint

int iCub::ctrl::OnlineStictionEstimator::joint
protected

Definition at line 179 of file tuning.h.

◆ Kd

double iCub::ctrl::OnlineStictionEstimator::Kd
protected

Definition at line 184 of file tuning.h.

◆ Ki

double iCub::ctrl::OnlineStictionEstimator::Ki
protected

Definition at line 184 of file tuning.h.

◆ Kp

double iCub::ctrl::OnlineStictionEstimator::Kp
protected

Definition at line 184 of file tuning.h.

◆ mtx

std::mutex iCub::ctrl::OnlineStictionEstimator::mtx
protected

Definition at line 165 of file tuning.h.

◆ mtx_doneEvent

std::mutex iCub::ctrl::OnlineStictionEstimator::mtx_doneEvent
protected

Definition at line 166 of file tuning.h.

◆ pid

parallelPID* iCub::ctrl::OnlineStictionEstimator::pid
protected

Definition at line 175 of file tuning.h.

◆ state

enum { ... } iCub::ctrl::OnlineStictionEstimator::state

◆ stiction

yarp::sig::Vector iCub::ctrl::OnlineStictionEstimator::stiction
protected

Definition at line 169 of file tuning.h.

◆ stiction_limit

double iCub::ctrl::OnlineStictionEstimator::stiction_limit
protected

Definition at line 187 of file tuning.h.

◆ T

double iCub::ctrl::OnlineStictionEstimator::T
protected

Definition at line 181 of file tuning.h.

◆ t0

double iCub::ctrl::OnlineStictionEstimator::t0
protected

Definition at line 181 of file tuning.h.

◆ tg

double iCub::ctrl::OnlineStictionEstimator::tg
protected

Definition at line 186 of file tuning.h.

◆ trajGen

minJerkTrajGen iCub::ctrl::OnlineStictionEstimator::trajGen
protected

Definition at line 177 of file tuning.h.

◆ vel_thres

double iCub::ctrl::OnlineStictionEstimator::vel_thres
protected

Definition at line 185 of file tuning.h.

◆ velEst

AWLinEstimator iCub::ctrl::OnlineStictionEstimator::velEst
protected

Definition at line 173 of file tuning.h.

◆ x_acc

double iCub::ctrl::OnlineStictionEstimator::x_acc
protected

Definition at line 183 of file tuning.h.

◆ x_max

double iCub::ctrl::OnlineStictionEstimator::x_max
protected

Definition at line 182 of file tuning.h.

◆ x_min

double iCub::ctrl::OnlineStictionEstimator::x_min
protected

Definition at line 182 of file tuning.h.

◆ x_pos

double iCub::ctrl::OnlineStictionEstimator::x_pos
protected

Definition at line 183 of file tuning.h.

◆ x_vel

double iCub::ctrl::OnlineStictionEstimator::x_vel
protected

Definition at line 183 of file tuning.h.

◆ xd_pos

double iCub::ctrl::OnlineStictionEstimator::xd_pos
protected

Definition at line 186 of file tuning.h.


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