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_MISSION: MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE Unsupported #24692

Open
trolledbypro opened this issue Aug 18, 2023 · 0 comments
Open

AP_MISSION: MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE Unsupported #24692

trolledbypro opened this issue Aug 18, 2023 · 0 comments

Comments

@trolledbypro
Copy link
Contributor

trolledbypro commented Aug 18, 2023

Bug report

Issue details

This issue is related to #24691
I am attempting to increase compatibility for MAVSDK with ArduPilot. MAVSDK uses the following code when creating a mission sequence object to create the commands necessary in the sequence to control the gimbal: https://github.com/mavlink/MAVSDK/blob/e7657c2d87917df739186981f34f98a14c898893/src/mavsdk/plugins/mission/mission_impl.cpp#L459-L480

The acquire_gimbal_items_v2 method sends a MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE mission command when the boolean that represents if the GC has control over the gimbal is false
https://github.com/mavlink/MAVSDK/blob/e7657c2d87917df739186981f34f98a14c898893/src/mavsdk/plugins/mission/mission_impl.cpp#L1288-L1312

I identified that MAVSDK sending the MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE message is what is causing the MAV_MISSION_TYPE_UNSUPPORRTED message to be sent to the GC.

It appears that while ArduPilot does keep track of which sys/comp id controls a gimbal via a struct here

struct {
uint8_t sysid;
uint8_t compid;
} mavlink_control_id;

It does not use this struct in any way when actually controlling the gimbal.

Is it good practice to add MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE as a supported command in AP_MISSION but have it do nothing, at least until proper gimbal control is implemented?
I am mindful of PR #23737
This is something I have already implemented in my fork. I can submit a PR when I do further testing.

Version
ArduPlane SITL built from the main branch (current as of 18 August 2023)

Platform
[ X ] All
[ ] AntennaTracker
[ ] Copter
[ ] Plane
[ ] Rover
[ ] Submarine

Airframe type
SITL
Hardware type
SITL
Logs
MAVSDK fly_mission example log

[01:52:12|Info ] New system on: 172.29.176.1:56951 (with system ID: 1) (udp_connection.cpp:192)
[01:52:12|Debug] New system ID: 1 Comp ID: 1 (mavsdk_impl.cpp:694)
[01:52:12|Debug] Component Autopilot (1) added. (system_impl.cpp:379)
[01:52:12|Warn ] Vehicle type changed (new type: 1, old type: 0) (system_impl.cpp:222)
[01:52:12|Debug] Discovered 1 component(s) (system_impl.cpp:548)
Waiting for system to be ready
[01:52:13|Debug] Using gimbal protocol v2 (mission_impl.cpp:107)
[01:52:13|Debug] Using Gimbal Version 2 as gimbal manager information for gimbal device 1 was discovered (gimbal_impl.cpp:71)
System ready
Creating and uploading mission
Uploading mission...
Mission upload failed: Unsupported, exiting.
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

No branches or pull requests

1 participant