#include <sot/torque_control/current-controller.hh>


Public Member Functions | |
| CurrentController (const std::string &name) | |
| DECLARE_SIGNAL_IN (bemf_factor, dynamicgraph::Vector) | |
| Joint velocities; used to compensate for BEMF effect on low level current loop. More... | |
| DECLARE_SIGNAL_IN (dead_zone_offsets, dynamicgraph::Vector) | |
| DECLARE_SIGNAL_IN (dq, dynamicgraph::Vector) | |
| gain from input to output control values More... | |
| DECLARE_SIGNAL_IN (i_des, dynamicgraph::Vector) | |
| DECLARE_SIGNAL_IN (i_max, dynamicgraph::Vector) | |
| proportional current feedback gain More... | |
| DECLARE_SIGNAL_IN (i_max_dead_zone_compensation, dynamicgraph::Vector) | |
| DECLARE_SIGNAL_IN (i_measured, dynamicgraph::Vector) | |
| desired motor currents More... | |
| DECLARE_SIGNAL_IN (i_sens_gains, dynamicgraph::Vector) | |
| motor currents More... | |
| DECLARE_SIGNAL_IN (i_sensor_offsets_low_level, dynamicgraph::Vector) | |
| value of current tracking error at which deadzone is completely compensated More... | |
| DECLARE_SIGNAL_IN (i_sensor_offsets_real_in, dynamicgraph::Vector) | |
| offset of the current sensors seen by the low level More... | |
| DECLARE_SIGNAL_IN (in_out_gain, dynamicgraph::Vector) | |
| values at which to saturate the control (in bits) More... | |
| DECLARE_SIGNAL_IN (ki_current, dynamicgraph::Vector) | |
| proportional current feedback gain More... | |
| DECLARE_SIGNAL_IN (kp_current, dynamicgraph::Vector) | |
| gains of current sensors More... | |
| DECLARE_SIGNAL_IN (percentage_bemf_compensation, dynamicgraph::Vector) | |
| DECLARE_SIGNAL_IN (percentage_dead_zone_compensation, dynamicgraph::Vector) | |
| current control dead zone offsets More... | |
| DECLARE_SIGNAL_IN (u_max, dynamicgraph::Vector) | |
| max current allowed before stopping the controller (in Ampers) More... | |
| DECLARE_SIGNAL_IN (u_saturation, dynamicgraph::Vector) | |
| max desired current allowed before stopping the controller (in Ampers) More... | |
| DECLARE_SIGNAL_OUT (dead_zone_compensation, dynamicgraph::Vector) | |
| real offset of the current sensors More... | |
| DECLARE_SIGNAL_OUT (i_errors, dynamicgraph::Vector) | |
| dead-zone compensation current applied by the controller More... | |
| DECLARE_SIGNAL_OUT (i_errors_ll_wo_bemf, dynamicgraph::Vector) | |
| current tracking error More... | |
| DECLARE_SIGNAL_OUT (i_low_level, dynamicgraph::Vector) | |
| current measurements after gain and offset compensation More... | |
| DECLARE_SIGNAL_OUT (i_real, dynamicgraph::Vector) | |
| same as u when everything is fine, 0 otherwise More... | |
| DECLARE_SIGNAL_OUT (i_sensor_offsets_real_out, dynamicgraph::Vector) | |
| current measurements as seen by low-level ctrl More... | |
| DECLARE_SIGNAL_OUT (u, dynamicgraph::Vector) | |
| real offset of the current sensors More... | |
| DECLARE_SIGNAL_OUT (u_safe, dynamicgraph::Vector) | |
| virtual void | display (std::ostream &os) const |
| void | init (const double &dt, const std::string &robotRef, const unsigned int ¤tOffsetIters) |
| void | reset_integral () |
| current tracking error without BEMF effect More... | |
| void | sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *="", int=0) |
Protected Attributes | |
| dynamicgraph::Vector | m_avg_i_err_neg |
| dynamicgraph::Vector | m_avg_i_err_pos |
| unsigned int | m_currentOffsetIters |
| time to sleep at every iteration (to slow down simulation) More... | |
| double | m_dt |
| dynamicgraph::Vector | m_dz_coeff |
| bool | m_emergency_stop_triggered |
| true if the entity has been successfully initialized More... | |
| dynamicgraph::Vector | m_i_err_integr |
| dynamicgraph::Vector | m_i_offsets_real |
| bool | m_initSucceeded |
| bool | m_is_first_iter |
| control loop time period More... | |
| int | m_iter |
| true at the first iteration, false otherwise More... | |
| RobotUtilShrPtr | m_robot_util |
| double | m_sleep_time |
Definition at line 47 of file current-controller.hh.
| CurrentController | ( | const std::string & | name | ) |
Definition at line 44 of file current-controller.cpp.
| DECLARE_SIGNAL_IN | ( | bemf_factor | , |
| dynamicgraph::Vector | |||
| ) |
Joint velocities; used to compensate for BEMF effect on low level current loop.
| DECLARE_SIGNAL_IN | ( | dead_zone_offsets | , |
| dynamicgraph::Vector | |||
| ) |
percentage in [0;1] of the motor back-EMF that we should compensate 0 is none, 1 is all of it
| DECLARE_SIGNAL_IN | ( | dq | , |
| dynamicgraph::Vector | |||
| ) |
gain from input to output control values
| DECLARE_SIGNAL_IN | ( | i_des | , |
| dynamicgraph::Vector | |||
| ) |
| DECLARE_SIGNAL_IN | ( | i_max | , |
| dynamicgraph::Vector | |||
| ) |
proportional current feedback gain
| DECLARE_SIGNAL_IN | ( | i_max_dead_zone_compensation | , |
| dynamicgraph::Vector | |||
| ) |
percentage in [0;1] of the motor driver dead zone that we should compensate 0 is none, 1 is all of it
| DECLARE_SIGNAL_IN | ( | i_measured | , |
| dynamicgraph::Vector | |||
| ) |
desired motor currents
| DECLARE_SIGNAL_IN | ( | i_sens_gains | , |
| dynamicgraph::Vector | |||
| ) |
motor currents
| DECLARE_SIGNAL_IN | ( | i_sensor_offsets_low_level | , |
| dynamicgraph::Vector | |||
| ) |
value of current tracking error at which deadzone is completely compensated
| DECLARE_SIGNAL_IN | ( | i_sensor_offsets_real_in | , |
| dynamicgraph::Vector | |||
| ) |
offset of the current sensors seen by the low level
| DECLARE_SIGNAL_IN | ( | in_out_gain | , |
| dynamicgraph::Vector | |||
| ) |
values at which to saturate the control (in bits)
| DECLARE_SIGNAL_IN | ( | ki_current | , |
| dynamicgraph::Vector | |||
| ) |
proportional current feedback gain
| DECLARE_SIGNAL_IN | ( | kp_current | , |
| dynamicgraph::Vector | |||
| ) |
gains of current sensors
| DECLARE_SIGNAL_IN | ( | percentage_bemf_compensation | , |
| dynamicgraph::Vector | |||
| ) |
Link between velocity and current; to compensate for BEMF effect on low level current loop (in A/rad.s-1)
| DECLARE_SIGNAL_IN | ( | percentage_dead_zone_compensation | , |
| dynamicgraph::Vector | |||
| ) |
current control dead zone offsets
| DECLARE_SIGNAL_IN | ( | u_max | , |
| dynamicgraph::Vector | |||
| ) |
max current allowed before stopping the controller (in Ampers)
| DECLARE_SIGNAL_IN | ( | u_saturation | , |
| dynamicgraph::Vector | |||
| ) |
max desired current allowed before stopping the controller (in Ampers)
| DECLARE_SIGNAL_OUT | ( | dead_zone_compensation | , |
| dynamicgraph::Vector | |||
| ) |
real offset of the current sensors
| DECLARE_SIGNAL_OUT | ( | i_errors | , |
| dynamicgraph::Vector | |||
| ) |
dead-zone compensation current applied by the controller
| DECLARE_SIGNAL_OUT | ( | i_errors_ll_wo_bemf | , |
| dynamicgraph::Vector | |||
| ) |
current tracking error
| DECLARE_SIGNAL_OUT | ( | i_low_level | , |
| dynamicgraph::Vector | |||
| ) |
current measurements after gain and offset compensation
| DECLARE_SIGNAL_OUT | ( | i_real | , |
| dynamicgraph::Vector | |||
| ) |
same as u when everything is fine, 0 otherwise
| DECLARE_SIGNAL_OUT | ( | i_sensor_offsets_real_out | , |
| dynamicgraph::Vector | |||
| ) |
current measurements as seen by low-level ctrl
| DECLARE_SIGNAL_OUT | ( | u | , |
| dynamicgraph::Vector | |||
| ) |
real offset of the current sensors
| DECLARE_SIGNAL_OUT | ( | u_safe | , |
| dynamicgraph::Vector | |||
| ) |
|
virtual |
Definition at line 337 of file current-controller.cpp.
| void init | ( | const double & | dt, |
| const std::string & | robotRef, | ||
| const unsigned int & | currentOffsetIters | ||
| ) |
Initialize
| dt | control interval |
| currentOffsetIters | number of iterations while control is disabled to calibrate current sensors. The recommended way is to use the signal max_current. |
Definition at line 96 of file current-controller.cpp.
| void reset_integral | ( | ) |
current tracking error without BEMF effect
Definition at line 331 of file current-controller.cpp.
|
inline |
Definition at line 109 of file current-controller.hh.
|
protected |
Definition at line 129 of file current-controller.hh.
|
protected |
Definition at line 128 of file current-controller.hh.
|
protected |
time to sleep at every iteration (to slow down simulation)
Definition at line 122 of file current-controller.hh.
|
protected |
Definition at line 117 of file current-controller.hh.
|
protected |
Definition at line 126 of file current-controller.hh.
|
protected |
true if the entity has been successfully initialized
Definition at line 116 of file current-controller.hh.
|
protected |
Definition at line 124 of file current-controller.hh.
|
protected |
Definition at line 123 of file current-controller.hh.
|
protected |
Definition at line 115 of file current-controller.hh.
|
protected |
control loop time period
Definition at line 118 of file current-controller.hh.
|
protected |
true at the first iteration, false otherwise
Definition at line 119 of file current-controller.hh.
|
protected |
Definition at line 114 of file current-controller.hh.
|
protected |
Definition at line 120 of file current-controller.hh.