Timeout error while mission clear/download/upload. Ardupilot. SITL MissionPlanner

Guys, please tell me.
I have this situation.
At first I used MAVSDK version 1.4.17 from Sept 22 this year release. I tried loading the mission into Ardupilot. Loaded the mission into SITL Mission Planer, ArduCopter version 4.4.4. I did this successfully.

An example of a download is like in this attached file fly_mission.cpp. It worked with the release of MAVSDK 1.4.17. I use MissionRaw to load the mission into Ardupilot.

fly_mission.cpp (9.6 KB)

Then I switched to the main branch.
After the switch, when loading the mission into Ardupilot, at the stage of executing the mission_raw.clear_mission() function, I get the MissionRaw::Result::Timeout error. I commented out the mission_raw.clear_mission() function.
Next comes the execution of the mission_raw.download_mission() function like this:
auto download_result = mission_raw.download_mission();.
And in download_result I also get the error MissionRaw::Result::Timeout.
I tried to comment out everything related to cleaning and loading the mission from Ardupilot into my program. And when I try to upload a mission from my program to Ardupilot like this: auto upload_result = mission_raw.upload_mission(mission_items); in upload_result I get the same error MissionRaw::Result::Timeout.

Please tell me what I need to do to load the mission into Ardupilot while in the main branch that I uploaded to my program on December 13, 2023?

Hello!

So, if you are interested, I will write what I did to ensure that the loading of the mission into the Ardupilot, as well as takeoff and stable execution of the mission, worked in my program. I’ll say right away that I use MissionRaw to load the mission.

I switched to the MAVSDK 1.4.18 release. Then I took the takeoff_async function from the main branch (MAVSDK/src/mavsdk/plugins/action
/action_impl.cpp). And of course I added two take-off functions from the main branch for PX4 and Ardurilot takeoff_async_px4 and takeoff_async_apm (MAVSDK/src/mavsdk/plugins/action
/action_impl.cpp). I added all these functions in the same way as they are in the main branch.

Accordingly, my mission loads when I’m on release 1.4.18 and takeoff works as it should.

Thanks for help @julianoes !

Here are the takeoff funcs ive added )
takeoff_funcs.txt (1.9 KB)

Thanks @Zvereman1.

And by the way, this might get easier soon, now that v2 is out: Release v2.0.0 · mavlink/MAVSDK · GitHub

1 Like