Skip to content

Commit

Permalink
Made the requested changes ib LuGre parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-git committed Dec 17, 2024
1 parent fe4b56e commit da706ea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -958,12 +958,8 @@ bool embObjMotionControl::fromConfig_Step2(yarp::os::Searchable &config)
////// LUGRE PARAMETERS
if(! _mcparser->parseLugreGroup(config,_lugre_params))
{
yWarning() << "embObjMC " << getBoardInfo() << "LUGRE section: missing, sensorless torque estimation disabled";
static const double NOT_AVAILABLE = -1.0;
for(j=0; j<_njoints; j++)
{
_lugre_params[j].Km = NOT_AVAILABLE;
}
yError() << "embObjMC " << getBoardInfo() << "LUGRE section: error detected in parameters syntax";

}

////// IMPEDANCE LIMITS DEFAULT VALUES (UNDER TESTING)
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/icubmod/embObjMotionControl/eomcParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2484,7 +2484,7 @@ bool Parser::parseLugreGroup(yarp::os::Searchable &config,std::vector<lugreParam
{
for (int j = 0; j<_njoints; ++j)
{
lugre[j].S0 = 0.0;
lugre[j].Km = 1.0;
}

yWarning() <<"embObjMC BOARD " << _boardname << "fromConfig(): Warning: no LUGRE group found in config file, returning";
Expand Down
21 changes: 9 additions & 12 deletions src/libraries/icubmod/embObjMotionControl/eomcParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -514,18 +514,15 @@ typedef struct
// LuGre friction model parameters
typedef struct
{
double Km; // Motor torque constant (not strictly LuGre) but required to compute the net torque
double Kw; // Viscous friction constant
double S0; // LuGre bristle analogy eleastic constant
double S1; // LuGre bristle analogy viscous constant
double Vth; // Stribeck velocity threshold
double Fc_pos; // Coulomb friction constant (positive rotation)
double Fc_neg; // Coulomb friction constant (negative rotation)
double Fs_pos; // Stribeck friction constant (positive rotation)
double Fs_neg; // Stribeck friction constant (negative rotation)
double tbd0; // for future use?
double tbd1; // for future use?
double tbd2; // for future use?
double Km; // Motor torque constant (not strictly LuGre) but required to compute the net torque [Nm/A]
double Kw; // Viscous friction constant [Nm/(rad/s)]
double S0; // LuGre bristle analogy eleastic constant [Nm/rad]
double S1; // LuGre bristle analogy viscous constant [Nm/(rad/s)]
double Vth; // Stribeck velocity threshold [rad/s]
double Fc_pos; // Coulomb friction constant (positive rotation) [Nm]
double Fc_neg; // Coulomb friction constant (negative rotation) [Nm]
double Fs_pos; // Stribeck friction constant (positive rotation) [Nm]
double Fs_neg; // Stribeck friction constant (negative rotation) [Nm]
} lugreParameters_t;

typedef struct
Expand Down

0 comments on commit da706ea

Please sign in to comment.