Set waypoints via pymavlink

Hi Bluerobotics! I want to set waypoints to ardusub via pymavlink. I think I should start with one point mission. I saw some messages in pymavlink, list below. Is it some way to do that? I want only use waypoint misiion, I mean point by point mission, passing through in auto mode.

https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_WAYPOINT
This is not about that, but close.
https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_LOITER_UNLIM
https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_LOITER_TURNS

Hi @YuryArnaut,

Since missions are not officially supported in ArduSub, that may result in unstable behavior.
But if you are still willing to test it, you can base your work under pymavlink waypoint code:

Hello,

I’m trying to do the same thing as @YuryArnaut. I am using this code (Waypoint_Test.txt (1.7 KB)) and testing it through SITL and having trouble getting it to work.
I get no errors in SITL when I run the code but the ardusub does not move to the waypoints. I’ve tried setting the ardusub into both guided and auto mode and I get the same result.

This is the output from the SITL console:

Got COMMAND_ACK: COMPONENT_ARM_DISARM: ACCEPTED
Got COMMAND_ACK: DO_SET_MODE: ACCEPTED
Got MISSION_ACK: TYPE_MISSION: ACCEPTED
APM: Flight plan received
Got MISSION_ACK: TYPE_MISSION: ACCEPTED
Got COMMAND_ACK: COMPONENT_ARM_DISARM: ACCEPTED

Would you be able to point me to where the problem might be? I’m new to pymavlink so I’m not really sure what the problem is.

Thank you!

I meant to tag @patrickelectric in the above comment but it won’t let me edit.
If you have any insight on this that would be great!