Fix gyroscopic precession sign: pitch term opposite roll#86
Open
Zaffer wants to merge 1 commit into
Open
Conversation
The propeller gyroscopic reaction torque is -ω × h with rotor angular momentum h = h_z·ẑ, giving (-q·h_z, +p·h_z, 0) — the roll and pitch components have opposite signs. Both the numeric and symbolic dynamics had the pitch component as -p·h_z (same sign as roll), so one axis of the gyroscopic cross-coupling was inverted. Drop the leading minus on the pitch row in both. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The propeller gyroscopic reaction torque had the wrong sign on the pitch axis, in both
dynamics(numeric) andsymbolic_dynamics(crazyflow/dynamics/first_principles/dynamics.py).The term is
-ω × hwith rotor angular momentumh = h_z·ẑ, which gives(-q·h_z, +p·h_z, 0). The roll and pitch components must have opposite signs (it's a cross product). The code had both negative (-q·h_z, -p·h_z), so the roll-rate to pitch-torque coupling was inverted while pitch-rate to roll-torque was correct.Fix is to drop the leading minus on the pitch row in both paths.
Note: This only matters when
prop_inertiaand net rotor angular momentum are non-negligible (larger props / quads, during yaw-type maneuvers). Is negligible for a Crazyflie. Both paths fixed identically, so numeric == symbolic still holds.