Skip to content

Fix cs_quat2euler degrees and duplicate CasADi function names - #152

Merged
amacati merged 3 commits into
learnsyslab:mainfrom
malikdurmus:fix-casadi-rotation
Nov 18, 2026
Merged

amacati merged 3 commits into
learnsyslab:mainfrom
malikdurmus:fix-casadi-rotation

Conversation

@malikdurmus

Copy link
Copy Markdown
Contributor

Split from #151.

cs_quat2euler(degrees=True) converts the wrong way

The degrees branch multiplied by pi / 180 instead of 180 / pi (This is a silent error!). The test i added compares against scipy's as_euler for extrinsic, intrinsic and symmetric sequences, in both radians and degrees.

Duplicate CasADi function names in rotation.py

cs_ang_vel_deriv2rpy_rates_deriv and cs_rpy_rates_deriv2ang_vel_deriv were both created with the name "cs_ang_vel2rpy_rates". I think this doesn't affect simulation results, but it gives misleading names in printouts and error messages.

Comment thread tests/unit/dynamics/test_rotation.py Resolved
Comment thread tests/unit/dynamics/test_rotation.py Resolved
malikdurmus and others added 2 commits November 18, 2026 17:38
- Convert radians to degrees in cs_quat2euler(degrees=True) instead of the inverse
- Give the CasADi derivative conversion functions unique names
@ratheron
ratheron force-pushed the fix-casadi-rotation branch from 2c8bba3 to cc18ccd Compare November 18, 2026 16:46
@ratheron
ratheron requested a review from amacati November 18, 2026 16:47
@amacati
amacati merged commit 695a12e into learnsyslab:main Nov 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants