Derivations#
Variable Name |
Symbol |
|---|---|
Configuration |
\(q\) |
Configuration displacement |
\(\Delta q\) |
Integration timestep |
\(dt\) |
Velocity in tangent space |
\(v = \frac{\Delta q}{dt}\) |
Configuration limits |
\(q_{\text{min}}, q_{\text{max}}\) |
Maximum joint velocity magnitude |
\(v_{\text{max}}\) |
Identity matrix |
\(I\) |
Limits#
Configuration limit#
Applying a first-order Taylor expansion on the configuration yields:
Rewriting as \(G \Delta q \leq h\) and separating the inequalities:
Stacking these inequalities gives:
Velocity limit#
Given the maximum joint velocity magnitudes \(v_{\text{max}}\), the joint velocity limits can be expressed as:
Rewriting as \(G \Delta q \leq h\) and separating the inequalities:
Stacking these inequalities gives:
Tasks#
Posture task#
A posture task penalizes the deviation of the current configuration from a preferred posture. Its error and Jacobian are
First-order task dynamics#
Using the generic relation \(J(q)\,\Delta q = -\alpha\,e(q)\) gives
Quadratic-program formulation#
The task enters the QP as the weighted least-squares term
with a diagonal, positive weight matrix \(W = \mathrm{diag}(\lambda_i)\). Substituting \(J = I_{n_v}\) and equating the gradient to zero yields
identical to the first-order dynamics and independent of the weights because \(W\) is full-rank.
Velocity interpretation#
Interpreting the displacement over the solver timestep \(dt\) as a velocity command gives
where \(k_p = \alpha / dt\). When the implementation uses \(dt = 1\), the proportional gain reduces to \(k_p = \alpha\). Hence the posture task behaves as a joint-space proportional controller that is always full-rank and therefore provides robust regularization whenever primary tasks are ill-conditioned.
Damping task#
The damping task penalizes joint motion itself, i.e.the displacement
Δq. It does not target a reference posture: its desired error is
identically zero.
Error and Jacobian#
Quadratic cost#
Inserted in the generic task objective
with \(e(q)=0\), \(J = I_{n_v}\), and default gain \(\alpha = 1\), the cost reduces to
where \(W = \operatorname{diag}(\lambda_i)\) comes from the
user-supplied cost vector.
Optimality conditions#
Taking the gradient and setting it to zero gives
Thus, in the absence of other tasks, the damping task enforces \(\Delta q = 0\). When other tasks are present, the QP minimizes joint motion inside their solution set, yielding the minimum-norm velocity.
Connection to Levenberg-Marquardt / Tikhonov#
If a primary task with Hessian \(J_{h}^{\top}J_{h}\) becomes rank-deficient, adding the damping task makes the combined Hessian
strictly positive-definite (provided any \(\lambda_i>0\)). This is exactly Tikhonov regularization, preventing large joint speeds near singularities and selecting a unique solution.
Velocity interpretation#
With the library’s convention v = Δq / dt and
\(\Delta q = 0\), the commanded velocity is
The damping task therefore commands zero velocity; it acts as a regularizer that suppresses unnecessary motion when higher-priority tasks leave residual degrees of freedom.