|
| JointPosPDController (const std::vector< std::string > &joint_names) |
|
const base::commands::Joints & | update (const base::commands::Joints &setpoint, const base::samples::Joints &feedback) |
|
| PosPDController (size_t dim_controller) |
|
void | update () |
|
void | setPGain (const base::VectorXd &gain) |
|
const base::VectorXd & | pGain () |
|
void | setDGain (const base::VectorXd &gain) |
|
const base::VectorXd & | dGain () |
|
void | setFFGain (const base::VectorXd &gain) |
|
const base::VectorXd & | ffGain () |
|
void | setMaxCtrlOutput (const base::VectorXd &max_ctrl_out) |
|
const base::VectorXd & | maxCtrlOutput () |
|
void | setDeadZone (const base::VectorXd &dz) |
|
const base::VectorXd & | deadZone () |
|
base::VectorXd | getControlError () |
|
void | applySaturation (const base::VectorXd &in, const base::VectorXd &max, base::VectorXd &out) |
| Apply Saturation on the control output. If one or more values of <in> are bigger than the Corrresponding entry of <max>, all values will be scaled down according to the biggest ratio eta = in_i / max,i.
|
|
void | applyDeadZone (const base::VectorXd &in, const base::VectorXd &min, base::VectorXd &out) |
| Apply dead zone, i.e. minimum position control error. If one of the input value falls below minimum, it will be set to zero. Otherwise dead zone will be subtracted from the input value, to get a smooth transition:
|
|
The JointPosPDController class implements a PD Controller with feed forward on the base-Joints type. The following control schemes are available:
- Velocity Output: \(\dot{\mathbf{q}}_d = \mathbf{K}_d\dot{\mathbf{q}}_r + \mathbf{K}_pe\)
- Acceleration Output: \(\ddot{\mathbf{q}}_d = \mathbf{K}_{ff}\ddot{\mathbf{e}} + \mathbf{K}_d\dot{\mathbf{e}} + \mathbf{K}_p\mathbf{e}\),
where \( \mathbf{e} = \mathbf{q}_r-\mathbf{q} \), \( \dot{\mathbf{e}} = \dot{\mathbf{q}}_r-\dot{\mathbf{q}} \) and \( \ddot{\mathbf{e}} = \ddot{\mathbf{q}}_r-\ddot{\mathbf{q}} \)
\( \mathbf{q},\mathbf{q}_r \) - Actual and reference joint position
\( \dot{\mathbf{q}},\dot{\mathbf{q}}_r \) - Actual and reference joint velocity
\( \ddot{\mathbf{q}},\ddot{\mathbf{q}}_r \) - Actual and reference joint acceleration
\( \mathbf{K}_d,\mathbf{K}_p \) - Derivative and proportial gain matrices
\( \mathbf{K}_{ff} \) - Feed forward gain matrix
\( \ddot{\mathbf{q}}_d,\dot{\mathbf{q}}_d \) - Control output, desired acceleration or velocity
Note: If an input is NaN, it might be ignored by the controller. E.g. if the reference or actual velocity is none, the velocity error will be set to zero in the controller