Copter Shoots into Sky with LiDAR & Terrain Following

Hello Everyone!

I have a 1600mm Hexarotor for crop spraying and i recently configured it with a downward facing LiDAR TF-02 for terrain following while spraying at 2-3m altitude.
I am using a Pixhawk Cube Black with ArduCopter 4.0.0. The TF-02 is connected to Telemetry 1 Port.

The sensor worked perfectly in first test flight where i bring a car under the drone to see the terrain following. Here is a log:

I took the drone to a field and as soon as i took off in Loiter mode, the drone shoots to sky. It reached 100m despite Geo-fence set at 20m altitude, and the ascend speed was much higher than what i have set using SPEED_UP parameter. I tried to switch to LAND & RTL to no avail. It eventually came down very fast and did a really hard landing but i dont know how.

Here is the log:

I have tried to plot the Rangefinder data vs Barometer and CTUN.Alt and it is not making any sense to me. Please help me figure out what exactly happened, and how can i make it safe to fly for the next test.

Many Thanks

Sounds like an issue with the tune. I always have stabilize flight mode available for situations like this. I would also upgrade to 4.0.3, there are known bugs in 4.0.0.


I have performed an autotune and done multiple flights in Manual & Auto Modes without the Terrain Following Enabled. The Autotune logs have been verified by @Eosbandi and as he put it “Not perfect but good” How to Tune Copters with Seriously Heavy Payloads

I have removed the LiDAR and disabled terrain following since then and conducted more than10 flights without an issue. It seems like the TF-02 sensor was providing some wrong altitude estimate (like 1m) when copter was already at the desired level (e.g 5m) and this might have caused the Flight controller to keep increasing the throttle to reach 5m.

I am more concerned about the fact that the geo-fence was set at 20m altitude and it got breached (copter went to 100m). And why copter didn’t LAND or RTL from Transmitter Auxiliary switches.

An expert analysis of the log would be highly appreciated.

Many Thanks

Lidar and crop spraying does not mix. The spray particles reflect the laser from the lidar, and it will think that it too close to ground and start ascend. (been there done that). It did not trigger altitude fence, since lidar kept thinking it is too close to ground.
You have to use radar altimeter for spraying.