Use correct yaw convention in motion commander#516
Merged
Conversation
Requires reverting commit f6c0e73 in `crazyflie-firmware`, i.e., requires no longer inverting received yaw rates upon arrival in `crazyflie-firmware`
Member
|
Looks good! |
… backward compatibility The lib now checks the Crazyflie's CRTP version before sending velocity, zdistance, or hover setpoints. If the Crazyflie is outdated, it sends the legacy type with the original (negated) yaw to maintain compatibility. If the Crazyflie supports the new format, it sends the updated type with the correct yaw sign. This ensures a smooth transition when updating either the lib or Crazyflie separately. The legacy type will be deprecated in a future update.
Member
Author
|
Latest commits to this and bitcraze/crazyflie-firmware#1456 ensure compatibility when updating either the Crazyflie or lib independently. The lib now checks the Crazyflie's CRTP version and sends either the legacy packet (with the original negated yaw) or the new packet type (with the corrected yaw sign). This allows for a smooth transition without breaking existing functionality. The legacy types will be deprecated in the future. |
ToveRumar
approved these changes
Feb 18, 2025
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.
This PR updates the motion commander to use the correct yaw convention for yaw rate, aligning with the Crazyflie coordinate system. Specifically, it ensures that yaw rate follows the right-hand rule, as defined in the Crazyflie documentation.
To achieve this, it requires reverting commit f6c0e73 in crazyflie-firmware. That commit inverted the received yaw rates upon arrival, which is no longer necessary. The corresponding change is implemented in bitcraze/crazyflie-firmware#1456.
These two PRs must be merged together to avoid flipping the yaw rate (again). While we could consider maintaining compatibility, this was ultimately a bug—implemented incorrectly and inconsistently across different motion commander calls.
Fixes: #389