Decide first
ADR-0010 currently declines forward dynamics on the grounds that it requires the mass matrix to be factorised and an integrator, which is a simulator's job rather than a controller's.
The ADR therefore keeps massMatrix as the half that belongs in this library.
That reasoning still holds for building a simulator.
There is, however, one controller-oriented use that needs a decision.
Checking whether a planned move stays within a drive's torque envelope only requires inverse dynamics, which already exists.
Predicting the motion that results after torque saturation requires forward dynamics.
Before implementing anything, settle this question:
- Is there a controller use in this library that inverse dynamics cannot serve?
- If the only answer is "so users can simulate", close this issue as not planned and point back to ADR-0010.
If it is built
Implement a single-step solve, not a simulator or integrator.
The intended operation is:
forwardDynamics(q, qd, tau) -> qdd
The implementation should:
- build the mass matrix
M
- obtain the bias term using one
inverseDynamics call with zero acceleration
- form
tau - C qd - g
- solve
M qdd = b using Cholesky
For a valid chain, M is symmetric positive definite.
Acceptance criteria
References
docs/adr/0010-dynamics-in-the-base-frame.md, Decision 3 and Consequences.
Decide first
ADR-0010 currently declines forward dynamics on the grounds that it requires the mass matrix to be factorised and an integrator, which is a simulator's job rather than a controller's.
The ADR therefore keeps
massMatrixas the half that belongs in this library.That reasoning still holds for building a simulator.
There is, however, one controller-oriented use that needs a decision.
Checking whether a planned move stays within a drive's torque envelope only requires inverse dynamics, which already exists.
Predicting the motion that results after torque saturation requires forward dynamics.
Before implementing anything, settle this question:
If it is built
Implement a single-step solve, not a simulator or integrator.
The intended operation is:
forwardDynamics(q, qd, tau) -> qddThe implementation should:
MinverseDynamicscall with zero accelerationtau - C qd - gM qdd = busing CholeskyFor a valid chain,
Mis symmetric positive definite.Acceptance criteria
forwardDynamics(q, qd, tau) -> qdd.qddthroughinverseDynamics, then feed the resulting torque intoforwardDynamics.References
docs/adr/0010-dynamics-in-the-base-frame.md, Decision 3 and Consequences.