Last week I tried the sitl simulator for the first time by following this tutorial, which worked great. I just ran the commands below and the simulation started flying the waypoints.
sim_vehicle.py -v ArduPlane --console --map
wp load ../Tools/autotest/Generic_Missions/CMAC-circuit.txt
arm throttle
mode auto
Today I wanted to try that again. As far as I know, nothing changed and I ran exactly the same commands, but the airplane just flies in circles and according to the console, it’s constantly hitting the ground as well.
Below are two screenshots of what I see. In the first you see the airplane flying in circles from the starting point. In the second screenshot I expanded the console so you see that it received the commands and then started hitting the ground in circles.
Does anybody know what’s going on here?
And even better: how would you suggest I find out what is wrong? How would I debug this?
I am also interested in how can we disable this behaviour! Or at least to make it pass through the waypoint first, then circle it. I tried tampering with the WP_RADIUS, WP_MAX_RADIUS, WP_LOITER_RAD, FOLL_DIST_MAX, but all failed in giving me what I needed… In my situation, I am trying to use the MAV_CMD_NAV_WAYPOINT with GUIDED mode and the same thing happens as it did with you @kramer65. Ideally someone knows how to disable this behaviour!
It does what it is order too. And from memory this command is for auto mode, using it with GUIDED mode was an old hack. Try using Messages (common) · MAVLink Developer Guide
But in anycase, when a plane pass a target location it will circling as it cannot stop
Guided will follow a path if you send the point to follow regulary , with something like MAVLINK_MSG_ID_SET_POSITION_TARGET_GLOBAL_INT or MAV_CMD_DO_REPOSITION , that is the point of GUIDED mode
I am relatively new to Ardupilot and have the same problem. @Sefibrah Have you found a solution so that the airplane flies through the waypoint instead of turning off in front of them and just circling around the waypoint?