I am using the latest version of Mission Planner. The latest version of SITL for Mission Planner has been downloaded. In MAVSDK I am on the main branch with the latest changes. In the Mission Planner, the TCP “server” is launched at the standard address 127.0.0.1 and port 14550.
The connection is normal. Telemetry is loading. Then the mission begins loading.
I am loading the mission through MAVSDK into the Mission Planner SITL. Here’s an example (file attached). I changed it a little so that I could run it from my program, but the essence has not changed.
And I get the error InvalidArgument.
I use mission_row.
Please tell me what am I doing wrong? fly_mission.cpp (9.5 KB)
Aha, it looks like you’re downloading the mission first, so item 0 is already in the vector. Then you’re adding yet another home point, and so you end up with two home items with seq 0.
Just do:
mission_plan.clear()
right after extracting the home position, and before adding items.
I’ve added the example as it works (at least the mission upload) for me.
Thank you Julian!!! It works for me! I`ve done as you say and mission was uploaded successfully! Now i know how to integrate this to my program. Thanks again so much
I`ll try to do as you say. But a bit later. For now I need to learn about MAVSD and MAVLINK some more to have more understanding. ))