You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The text was updated successfully, but these errors were encountered:
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
ardupilot/libraries/AP_Mount/AP_Mount_Backend.h
Lines 272 to 275 in e14afa6
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
The text was updated successfully, but these errors were encountered: