#include <sot/torque_control/joint-torque-controller.hh>
Public Member Functions | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | JointTorqueController (const std::string &name) |
DECLARE_SIGNAL_IN (coulomb_friction_compensation_percentage, dynamicgraph::Vector) | |
integral error saturation | |
DECLARE_SIGNAL_IN (dq_des, dynamicgraph::Vector) | |
desired joints torques tauDes | |
DECLARE_SIGNAL_IN (jointsAccelerations, dynamicgraph::Vector) | |
dq | |
DECLARE_SIGNAL_IN (jointsPositions, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (jointsTorques, dynamicgraph::Vector) | |
ddq | |
DECLARE_SIGNAL_IN (jointsTorquesDerivative, dynamicgraph::Vector) | |
estimated joints torques tau | |
DECLARE_SIGNAL_IN (jointsTorquesDesired, dynamicgraph::Vector) | |
estimated joints torques derivative dtau | |
DECLARE_SIGNAL_IN (jointsVelocities, dynamicgraph::Vector) | |
q | |
DECLARE_SIGNAL_IN (KdTorque, dynamicgraph::Vector) | |
integral gain for torque feedback controller | |
DECLARE_SIGNAL_IN (KdVel, dynamicgraph::Vector) | |
derivative gain for torque feedback controller | |
DECLARE_SIGNAL_IN (KiTorque, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (KiVel, dynamicgraph::Vector) | |
derivative gain for velocity feedback | |
DECLARE_SIGNAL_IN (KpTorque, dynamicgraph::Vector) | |
desired joint velocities | |
DECLARE_SIGNAL_IN (motorParameterKa_n, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (motorParameterKa_p, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (motorParameterKf_n, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (motorParameterKf_p, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (motorParameterKt_n, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (motorParameterKt_p, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (motorParameterKv_n, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (motorParameterKv_p, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (polySignDq, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (torque_integral_saturation, dynamicgraph::Vector) | |
integral gain for velocity feedback | |
DECLARE_SIGNAL_OUT (smoothSignDq, dynamicgraph::Vector) | |
Desired current. | |
DECLARE_SIGNAL_OUT (torque_error_integral, dynamicgraph::Vector) | |
smooth approximation of sign(dq) | |
DECLARE_SIGNAL_OUT (u, dynamicgraph::Vector) | |
virtual void | display (std::ostream &os) const |
void | init (const double ×tep, const std::string &robotRef) |
void | reset_integral () |
Protected Member Functions | |
void | sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *="", int=0) |
Protected Attributes | |
Eigen::VectorXd | m_current_des |
Eigen::VectorXd | m_currentErrIntegral |
integral of the torque error | |
Eigen::VectorXd | m_dqErrIntegral |
integral of the current error | |
double | m_dt |
RobotUtilShrPtr | m_robot_util |
integral of the velocity error | |
Eigen::VectorXd | m_tau_star |
timestep of the controller | |
Eigen::VectorXd | m_tauErrIntegral |
MotorModel | motorModel |
integral of the torque tracking error | |
This Entity takes as inputs the estimated joints' positions, velocities, accelerations and torques and it computes the desired current to send to the motors board in order to track the desired joints torques. Most of the input of this entity are computed by the entity ForceTorqueEstimator.
QUICK START Create the entity, plug all the input signals, call the init method specifying the control-loop time step. For instance: jtc = JointTorqueController("jtc"); plug(estimator.jointsPositions, jtc.jointsPositions); plug(estimator.jointsVelocities, jtc.jointsVelocities); plug(estimator.jointsAccelerations, jtc.jointsAccelerations); plug(estimator.jointsTorques, jtc.jointsTorques); jtc.KpTorque.value = N_DOF*(10.0,); jtc.KiTorque.value = N_DOF*(0.01,); jtc.init(dt);
DETAILS To do...
Definition at line 67 of file joint-torque-controller.hh.
JointTorqueController | ( | const std::string & | name | ) |
— CONSTRUCTOR -—
Definition at line 61 of file joint-torque-controller.cpp.
DECLARE_SIGNAL_IN | ( | coulomb_friction_compensation_percentage | , |
dynamicgraph::Vector | |||
) |
integral error saturation
parameters for the linear model
DECLARE_SIGNAL_IN | ( | dq_des | , |
dynamicgraph::Vector | |||
) |
desired joints torques tauDes
DECLARE_SIGNAL_IN | ( | jointsAccelerations | , |
dynamicgraph::Vector | |||
) |
dq
DECLARE_SIGNAL_IN | ( | jointsPositions | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | jointsTorques | , |
dynamicgraph::Vector | |||
) |
ddq
DECLARE_SIGNAL_IN | ( | jointsTorquesDerivative | , |
dynamicgraph::Vector | |||
) |
estimated joints torques tau
DECLARE_SIGNAL_IN | ( | jointsTorquesDesired | , |
dynamicgraph::Vector | |||
) |
estimated joints torques derivative dtau
DECLARE_SIGNAL_IN | ( | jointsVelocities | , |
dynamicgraph::Vector | |||
) |
q
DECLARE_SIGNAL_IN | ( | KdTorque | , |
dynamicgraph::Vector | |||
) |
integral gain for torque feedback controller
DECLARE_SIGNAL_IN | ( | KdVel | , |
dynamicgraph::Vector | |||
) |
derivative gain for torque feedback controller
DECLARE_SIGNAL_IN | ( | KiTorque | , |
dynamicgraph::Vector | |||
) |
proportional gain for torque feedback controller
DECLARE_SIGNAL_IN | ( | KiVel | , |
dynamicgraph::Vector | |||
) |
derivative gain for velocity feedback
DECLARE_SIGNAL_IN | ( | KpTorque | , |
dynamicgraph::Vector | |||
) |
desired joint velocities
DECLARE_SIGNAL_IN | ( | motorParameterKa_n | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | motorParameterKa_p | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | motorParameterKf_n | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | motorParameterKf_p | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | motorParameterKt_n | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | motorParameterKt_p | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | motorParameterKv_n | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | motorParameterKv_p | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | polySignDq | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | torque_integral_saturation | , |
dynamicgraph::Vector | |||
) |
integral gain for velocity feedback
DECLARE_SIGNAL_OUT | ( | smoothSignDq | , |
dynamicgraph::Vector | |||
) |
Desired current.
DECLARE_SIGNAL_OUT | ( | torque_error_integral | , |
dynamicgraph::Vector | |||
) |
smooth approximation of sign(dq)
DECLARE_SIGNAL_OUT | ( | u | , |
dynamicgraph::Vector | |||
) |
|
virtual |
Definition at line 277 of file joint-torque-controller.cpp.
void init | ( | const double & | timestep, |
const std::string & | robotRef | ||
) |
Initialize the JointTorqueController.
timestep | Period (in seconds) after which the sensors' data are updated. |
Definition at line 131 of file joint-torque-controller.cpp.
void reset_integral | ( | ) |
Definition at line 169 of file joint-torque-controller.cpp.
|
inlineprotected |
Definition at line 138 of file joint-torque-controller.hh.
|
protected |
Definition at line 129 of file joint-torque-controller.hh.
|
protected |
integral of the torque error
Definition at line 131 of file joint-torque-controller.hh.
|
protected |
integral of the current error
Definition at line 134 of file joint-torque-controller.hh.
|
protected |
Definition at line 127 of file joint-torque-controller.hh.
|
protected |
integral of the velocity error
Definition at line 136 of file joint-torque-controller.hh.
|
protected |
timestep of the controller
Definition at line 128 of file joint-torque-controller.hh.
|
protected |
Definition at line 130 of file joint-torque-controller.hh.
|
protected |
integral of the torque tracking error
Definition at line 126 of file joint-torque-controller.hh.