|
| JointPosPDController (uint dim) |
|
const Eigen::VectorXd & | update (const Eigen::VectorXd &ref_pos, const Eigen::VectorXd &ref_vel, const Eigen::VectorXd &pos) |
| Compute velocity level control output.
|
|
const Eigen::VectorXd & | update (const Eigen::VectorXd &ref_pos, const Eigen::VectorXd &ref_vel, const Eigen::VectorXd &ref_acc, const Eigen::VectorXd &pos, const Eigen::VectorXd &vel) |
| Compute acceleration level control output.
|
|
void | setPGain (const Eigen::VectorXd &gain) |
|
const Eigen::VectorXd & | pGain () |
|
void | setDGain (const Eigen::VectorXd &gain) |
|
const Eigen::VectorXd & | dGain () |
|
void | setMaxCtrlOutput (const Eigen::VectorXd &max_ctrl_out) |
|
const Eigen::VectorXd & | maxCtrlOutput () |
|
void | applySaturation (const Eigen::VectorXd &in, const Eigen::VectorXd &max, Eigen::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.
|
|
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