#include <sot/talos_balance/hip-flexibility-compensation.hh>
Public Member Functions | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | HipFlexibilityCompensation (const std::string &name) |
DECLARE_SIGNAL_IN (q_des, dynamicgraph::Vector) | |
Desired joint configuration of the robot. More... | |
DECLARE_SIGNAL_IN (tau, dynamicgraph::Vector) | |
Current torque mesured at each joint. More... | |
DECLARE_SIGNAL_IN (K_l, double) | |
Left flexibility correction for the angular computation. More... | |
DECLARE_SIGNAL_IN (K_r, double) | |
Right flexibility correction for the angular computation. More... | |
DECLARE_SIGNAL_OUT (tau_filt, dynamicgraph::Vector) | |
Derivative gain (double) for the error. More... | |
DECLARE_SIGNAL_OUT (delta_q, dynamicgraph::Vector) | |
Angular correction of the flexibility. More... | |
DECLARE_SIGNAL_OUT (q_cmd, dynamicgraph::Vector) | |
Corrected desired joint configuration of the robot with flexibility joint configuration q_cmd = q_des + RateLimiter(delta_q) More... | |
virtual void | display (std::ostream &os) const |
void | init (const double &dt, const std::string &robotName) |
Initialize the entity. More... | |
dynamicgraph::Vector | lowPassFilter (const double &frequency, const dynamicgraph::Vector &signal, dynamicgraph::Vector &previous_signal) |
Compute the low pass filter of a signal given a frequency and the previous signal. More... | |
void | rateLimiter (const dynamicgraph::Vector &signal, dynamicgraph::Vector &previous_signal, dynamicgraph::Vector &output) |
Compute the limiter of a signal given the previous signal (based on first derivative). More... | |
void | setAngularSaturation (const double &saturation) |
Set the value of the saturation for the angular correction computation. More... | |
void | setRateLimiter (const double &rate) |
Set the value of the limiter for the the rate limiter of delta_q. More... | |
void | setTorqueLowPassFilterFrequency (const double &frequency) |
Set the LowPassFilter frequency for the torque computation. More... | |
Protected Attributes | |
double | m_delta_q_saturation |
double | m_dt |
true if the entity has been successfully initialized More... | |
bool | m_initSucceeded |
dynamicgraph::Vector | m_previous_delta_q |
dynamicgraph::Vector | m_previous_tau |
double | m_rate_limiter |
RobotUtilShrPtr | m_robot_util |
double | m_torqueLowPassFilterFrequency |
Definition at line 52 of file hip-flexibility-compensation.hh.
HipFlexibilityCompensation | ( | const std::string & | name | ) |
Definition at line 58 of file hip-flexibility-compensation.cpp.
References HipFlexibilityCompensation::init(), INPUT_SIGNALS, JOINT_DES_SIGNALS, HipFlexibilityCompensation::m_delta_q_saturation, HipFlexibilityCompensation::m_rate_limiter, HipFlexibilityCompensation::m_torqueLowPassFilterFrequency, OUTPUT_SIGNALS, HipFlexibilityCompensation::setAngularSaturation(), HipFlexibilityCompensation::setRateLimiter(), and HipFlexibilityCompensation::setTorqueLowPassFilterFrequency().
DECLARE_SIGNAL_IN | ( | q_des | , |
dynamicgraph::Vector | |||
) |
Desired joint configuration of the robot.
DECLARE_SIGNAL_IN | ( | tau | , |
dynamicgraph::Vector | |||
) |
Current torque mesured at each joint.
DECLARE_SIGNAL_IN | ( | K_l | , |
double | |||
) |
Left flexibility correction for the angular computation.
DECLARE_SIGNAL_IN | ( | K_r | , |
double | |||
) |
Right flexibility correction for the angular computation.
DECLARE_SIGNAL_OUT | ( | tau_filt | , |
dynamicgraph::Vector | |||
) |
Derivative gain (double) for the error.
Low pass filter of the signal tau
DECLARE_SIGNAL_OUT | ( | delta_q | , |
dynamicgraph::Vector | |||
) |
Angular correction of the flexibility.
DECLARE_SIGNAL_OUT | ( | q_cmd | , |
dynamicgraph::Vector | |||
) |
Corrected desired joint configuration of the robot with flexibility joint configuration q_cmd = q_des + RateLimiter(delta_q)
|
virtual |
Definition at line 277 of file hip-flexibility-compensation.cpp.
void init | ( | const double & | dt, |
const std::string & | robotName | ||
) |
Initialize the entity.
Definition at line 106 of file hip-flexibility-compensation.cpp.
References HipFlexibilityCompensation::m_dt, HipFlexibilityCompensation::m_initSucceeded, HipFlexibilityCompensation::m_previous_delta_q, HipFlexibilityCompensation::m_previous_tau, and HipFlexibilityCompensation::m_robot_util.
Referenced by HipFlexibilityCompensation::HipFlexibilityCompensation().
Vector lowPassFilter | ( | const double & | frequency, |
const dynamicgraph::Vector & | signal, | ||
dynamicgraph::Vector & | previous_signal | ||
) |
Compute the low pass filter of a signal given a frequency and the previous signal.
Definition at line 147 of file hip-flexibility-compensation.cpp.
References HipFlexibilityCompensation::m_dt.
Referenced by dynamicgraph::sot::talos_balance::DEFINE_SIGNAL_OUT_FUNCTION().
void rateLimiter | ( | const dynamicgraph::Vector & | signal, |
dynamicgraph::Vector & | previous_signal, | ||
dynamicgraph::Vector & | output | ||
) |
Compute the limiter of a signal given the previous signal (based on first derivative).
Definition at line 154 of file hip-flexibility-compensation.cpp.
References HipFlexibilityCompensation::m_dt, and HipFlexibilityCompensation::m_rate_limiter.
Referenced by dynamicgraph::sot::talos_balance::DEFINE_SIGNAL_OUT_FUNCTION().
void setAngularSaturation | ( | const double & | saturation | ) |
Set the value of the saturation for the angular correction computation.
Definition at line 139 of file hip-flexibility-compensation.cpp.
References HipFlexibilityCompensation::m_delta_q_saturation.
Referenced by HipFlexibilityCompensation::HipFlexibilityCompensation().
void setRateLimiter | ( | const double & | rate | ) |
Set the value of the limiter for the the rate limiter of delta_q.
Definition at line 143 of file hip-flexibility-compensation.cpp.
References HipFlexibilityCompensation::m_rate_limiter.
Referenced by HipFlexibilityCompensation::HipFlexibilityCompensation().
void setTorqueLowPassFilterFrequency | ( | const double & | frequency | ) |
Set the LowPassFilter frequency for the torque computation.
Definition at line 135 of file hip-flexibility-compensation.cpp.
References HipFlexibilityCompensation::m_torqueLowPassFilterFrequency.
Referenced by HipFlexibilityCompensation::HipFlexibilityCompensation().
|
protected |
Definition at line 105 of file hip-flexibility-compensation.hh.
Referenced by dynamicgraph::sot::talos_balance::DEFINE_SIGNAL_OUT_FUNCTION(), HipFlexibilityCompensation::HipFlexibilityCompensation(), and HipFlexibilityCompensation::setAngularSaturation().
|
protected |
true if the entity has been successfully initialized
Definition at line 103 of file hip-flexibility-compensation.hh.
Referenced by HipFlexibilityCompensation::init(), HipFlexibilityCompensation::lowPassFilter(), and HipFlexibilityCompensation::rateLimiter().
|
protected |
Definition at line 101 of file hip-flexibility-compensation.hh.
Referenced by dynamicgraph::sot::talos_balance::DEFINE_SIGNAL_OUT_FUNCTION(), and HipFlexibilityCompensation::init().
|
protected |
Definition at line 107 of file hip-flexibility-compensation.hh.
Referenced by dynamicgraph::sot::talos_balance::DEFINE_SIGNAL_OUT_FUNCTION(), and HipFlexibilityCompensation::init().
|
protected |
Definition at line 108 of file hip-flexibility-compensation.hh.
Referenced by dynamicgraph::sot::talos_balance::DEFINE_SIGNAL_OUT_FUNCTION(), and HipFlexibilityCompensation::init().
|
protected |
Definition at line 106 of file hip-flexibility-compensation.hh.
Referenced by HipFlexibilityCompensation::HipFlexibilityCompensation(), HipFlexibilityCompensation::rateLimiter(), and HipFlexibilityCompensation::setRateLimiter().
|
protected |
Definition at line 110 of file hip-flexibility-compensation.hh.
Referenced by HipFlexibilityCompensation::init().
|
protected |