Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copter: fix do-mount-control yaw scaling #21639

Merged
merged 1 commit into from Sep 6, 2022

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Sep 5, 2022

This fixes a scaling issue in Copter's consumption of the MAV_CMD_DO_MOUNT_CONTROL message. The command's yaw was being interpreted as if it was centi-degrees but the mavlink spec says degrees. This only affects Copters with a 2-axis gimbal

This is related to PR #21530 (which solved a similar problem in the AP_Mount driver but didn't resolve this Copter vehicle level issue).

This resolves issue #15699

I've tested this in SITL and confirmed that before, the vehicle was always pointed quite close to zero (e.g. a request for 90 degrees would point the vehicle at 0.9 deg) and that after it points in the correct direction.
mav-cmd-do-mount-control-copter-yaw-fix

As a side note, the handling of DO_MOUNT_CONTROL is odd in that the angles are treated as earth-frame angles with a 2-axis gimbal but body-frame angles when using a 3-axis gimbal. This odd difference is another good reason why we should encourage use of the new gimbalv2 messages like DO_GIMBAL_MANAGER_PITCHYAW.

@tridge tridge merged commit 38665a7 into ArduPilot:master Sep 6, 2022
@rmackay9 rmackay9 deleted the copter-yaw-check branch September 6, 2022 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants