MAVSDK-Python Fixed-Wing plane loiter around waypoint

I’m trying to do a autonomous mission with MAVSDK-Python.I’m using PX4 Plane. When I’m trying to go to a waypoint with a function which uses goto_location() function,Plane starts to loiter around that waypoint. What causes this problem?

@Erush I don’t think this is a “problem” since this is the expected behavior - since fixedwings cannot “stop”, it considers GOTO waypoints as a loiter waypoint with the default loiter radius.

Could you elaborate on what behavior you were expecting and what would be the desired behavior for your context?

I’m trying to go through the waypoints. What can I use for that?

I’m trying to go through the waypoints.

@Erush Could you explain why you are trying to do this with goto waypoints? If only a single goto waypoint is passed what is your expectation of the vehicle after it has passed the single waypoint?

Alternatively, you can set up a mission with normal position waypoints and navigate them through in mission mode

I have several waypoints which plane have to pass through. Like an 8 pattern. I tried to set up a mission like it from code but it didn’t worked like I expected either.

@Erush Your fly view(first image) shows that the mission was not transfered to the vehicle and it is just loitering around the takeoff waypoint.

Try planning the mission with QGC and fly mission and see if the vehicle is able to fly the full mission

It does not fly mission properly. It goes to next waypoint before going to the one before it.

@Erush Your fly view shows that the vehicle is orbiting a “Oribit” waypoint and seems like it is not in mission mode but maybe “hold” mode.

Can you share either a log of the flight or the mission file?

I can’t put them here. How can I send to you?

@Erush I think you can drag and drop them in this forum no? or you can send me a link on a drive

Looks like its working for me

Are you sure you uploaded the mission to the vehicle? Your mission was missing a landing pattern and therefore I had to add it.

How can I make it go like this? It is not going to waypoints like I expected. Even in your plan it does not go even close to waypoints on the upper side.

@Erush It is because your waypoints are too close, and the waypoints are “reached” since you are within distance to the waypoint of the acceptance radius.

Try putting the waypoints more further apart. The simulated vehicle cannot turn as tight as you have drawn in the picture

1 Like