Commit a2c5b42
ENH: derive constrained equations of motion for udot_rail2 tip-off phase
Complete the 3-DOF single-rail-button (tip-off) phase from issue #28.
- Fix the phase transition ordering: rail1 -> udot_rail2 (at effective_1rl,
upper button exit) -> u_dot_generalized (at effective_2rl, lower button
exit). Previously the thresholds were swapped, so udot_rail2 was inserted
after free flight and never exited.
- Replace the placeholder udot_rail2 (which reused free-flight dynamics with an
ad-hoc velocity projection) with rigorous constrained dynamics: the lower
button slides along the fixed rail while roll is suppressed. The reaction
wrench (normal force + roll moment) is solved from a 3x3 linear system so the
button's perpendicular acceleration and the roll acceleration vanish, derived
in the true body frame on top of the validated u_dot_generalized solution.
- Make the feature opt-in (use_udot_rail2 defaults to False); disabled runs are
bit-for-bit identical to previous behavior.
- Factor the rail-exit root finding into a shared helper.
- Rewrite the unit tests to check phase ordering, the opt-in default, the
on-rail constraint (button stays on the rail to machine precision), zero
roll, and the gravity tip-off direction.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 39431d1 commit a2c5b42
3 files changed
Lines changed: 358 additions & 390 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
0 commit comments