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

AP_Mount: support gimbal_manager_status and do_gimbal_manager_configure #23737

Merged
merged 6 commits into from
May 17, 2023

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented May 10, 2023

This supersedes PR #23713

This adds superficial support for two new mavlink messages meant to help de-conflict multiple mavlink devices attempting to control a gimbal. This is important so that development of QGC's camera/gimbal control screen can progress.

The support is "superficial" because it does not actually reject gimbal control commands that comes from devices that are not in control. To comprehensively block commands we need to consolidate handling of more commands (including DO_SET_ROI) within the AP_Mount library instead of within GCS_MAVLink.

This has been lightly tested in SITL including:

  • GIMBAL_MANAGER_STATUS message is returned in response to "long MAV_CMD_REQUEST_MESSAGE 281"
  • MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE commands are consumed and correctly affect the sysid/compid returned in the above message especially when the special values are passed in for sysid (e.g. 0:no one in control, -1:leave unchanged, -2:set itself in control, -3:remove control if currently in control)

testing-output

There's also a drive-by bug fix to the GIMBAL_MANAGER_INFORMATION gimbal_device_id instance field.

Copy link
Contributor

@MichelleRos MichelleRos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good for the blimp changes - sorry, I really need to do a lot of removal of unused code there...

@Davidsastresas
Copy link
Contributor

Looking great, thank you!

@trolledbypro
Copy link
Contributor

trolledbypro commented Aug 17, 2023

Hello all,
I am working on increasing MAVSDK compatibility with ArduPilot. My issue on their repo is mavlink/MAVSDK#2110. Through testing, I have discovered that MAVSDK sends DO_GIMBAL_MANAGER_CONFIGURE as part of the mission sequence:
image
image

Was this PR intended to allow DO_GIMBAL_MANAGER_CONFIGURE to work as a mission item, sent inside a mission sequence?. I do not see DO_GIMBAL_MANAGER_CONFIGURE as a supported command in https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_Mission/AP_Mission.cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants