Drone not following Waypoints


I’ve followed all procedures to tune the drone well.
It did Auto mission with great accuracy but suddenly this time it stopped following waypoints
I cant figure out the reason
I’ve attached log HERE


There appears to be only a Takeoff command in Auto mode, then after about 15 seconds you switch back to Loiter.
I can see there’s other waypoints on the map - what were your observations?

On the tuning subject, there’s some oscillations when you arm. I would adjust these:
Test to see if you can get these just a little bit lower:
MOT_SPIN_ARM,0.15 → maybe 0.12 ?
MOT_SPIN_MIN,0.2 → maybe 0.15 to 0.18 ?
just so they are not so close to the hover thrust value.

You could probably run Autotune to improve the attitude control a bit, this helps reduce unnecessary battery consumption amongst other things. But you tuning is reasonable how it is now.

the copter was going in totally wrong direction thats why switched to loiter and took it back

Yeah that;s cause ESC has a fixed range from 1100 to 1940 while I’ve mapped it to 1000 to 2000 so it starts spinning at 15%, that’s why spin arm is set that high. I will fix that in future flights

I’ve run auto tune multiple times and then settled on this PIDs

I’m not able to pinpoint why is it behaving this way

Then set MOT_PWM_MIN and _MAX to your ESC PWM range
then use MissionPlanner motor test to check MOT_SPIN_ARM

From the log I don’t see an obvious reason why it didn’t head for the 1st Waypoint. The position Innovations are all good. What does your Mission Plan look like?

Joining with what Dave said, there’s no obvious reason why it doesnt head for waypoint 1
I would upgrade to latest firmware and also set
to make sure the CAN GPS is booted up OK before the flight controller, even though it looks good in that log.

What are the actual waypoint details?

Instead of climbing vertically, its drifting to away

and one more thing, i had clamping offset error in prior flights with similar path deviations

Sorry, the map image is not orthographic,

Can you just show a screenshot of the waypoint list in MissionPlanner?

We can see that from the KMZ file already. It doesn’t do anything for us. Very cool looking place to fly though!!

Is this what you are looking for ?

unfortunately i dont have the mission plan list saved


No, we can reproduce that too. Something like this:

unfortunately i dont have that data anymore

Edit :

It looks like you want it to take off to 730 meters above takeoff altitude and fly about 2.5km to the next waypoint before just doing a Land (not a RTL)

Why do you have WP_NAVALT_MIN set to 730m ?

1 Like

Dave found it!
That will be a problem. It’s meant to be something like a few meters or so, to prevent the copter from launching sideways into people or objects. Unknown if it actually works - best to check you first waypoint is above your launch site, or switch to Auto once you’ve already launched.

1 Like

WP_NAVALT_MIN should work, there was a fix applied recently too

But as I mentioned it should be set to just a few meters since the copter can drift with wind until it reaches WP_NAVALT_MIN. And probably best to have FENCE_ENABLE,1 to ensure GPS 3D Fix is in good order before takeoff. The original idea was the copter wouldnt try to move laterally while still practically on the ground in case the first waypoint was (unexpectedly) a long distance away.
I’d advise to set waypoint 1 above the actual launch site or at least nearby with some reasonable altitude, and check it with your ground station when you get onsite. This way you can see that the copter navigates to and reaches this first waypoint before heading off into the distance.
End you mission with an RTL

In the log I had noticed that there was no desired acceleration (or maybe velocity??) recorded in PSCE and PSCN until you switched into Loiter and took over control. I wasn’t sure if this was related so I didnt mention it, but now it makes sense.

Wow ! you guys are awesome !

Theres a scenario where i have to land at an alitude lower than take off altitude.
For eg : take off at 0m but land at -700m. So if i want to trigger land speed at 10m above landing ground then what is the proper way to do it ? I dont want to trigger land speed at 710 meters above landing ground !
Does putting a bottom facing lidar fix that issue ?

A bit of advice. For a mission like that test it in Mission Planner Simulation before even thinking about flying it.

1 Like

If the DSM is accurate enough for your area (or you have your own) then you could try setting your altitude reference to terrain, rather than leaving it as relative. But as @dkemxr said, test it in the simulator before you fly.

1 Like