AUTO terrain following

I would like to make LIDAR terrain following in AUTO mode working and use
APM:Copter V3.4.1 (04c76843)
Mission Planner 1.3.41
TERRAIN_FOLLOW 1
TERRAIN_ENABLE 1

The Status tab shows:
TER_CURALT -7.43
TER_ALT 0
TER_LOAD 0
TER_PEND 0
TER_SPACE 100
and the SONAR_RANGE works too.

As soon I switch to AUTO, I receive “Failsafe: Terrain data missing”.

Can you tell how I get the terrain data (tho I just care about the LIDAR) into the Pixhawk?

Thanks for any help,

Krisu

1 Like

Hi,

Thanks for the report. There’s an issue opened (https://github.com/ArduPilot/ardupilot/issues/5191) where we will track this.

Krisu,
I think the issue is likely that when the vehicle is on the ground, the lidar is reporting a distance that’s below the RNGFND_MIN_CM. This makes the lidar become unhealthy and so the terrain failsafe will trigger immediately as you try to switch to Auto. The problem only occurs when the vehicle is on the ground? If you take-off and then switch to Auto does the same thing happen? If it only happens when starting auto from the ground then you should be able to resolve the problem by setting RNGFND_MIN_CM to be smaller (like 5cm). This is a safe thing to do especially if you’re using a digital connection to the range finder (i.e. I2C or Serial, not an analog range finder)
Thanks for the report!

Thank you Francisco and Randy

for the fast response: indeed,“Failsafe: Terrain data missing” disappears already when letting the LIDAR look from a table downwards (1m). Wind over here is just now 11m/s - I go to the test as soon as I can.

Best,

Krisu

Gentlemen,

https://drive.google.com/drive/folders/0B-lDc9-zD0TFQW5sSFlBSHh4dmc?usp=sharing

I replicated the unexpected behavior today and included the logs above.

Allow me to apology if this is just another RTFM :blush:

Best,

Krisu

I go right after AUTO into RTL

Gentlemen,

I can confirm that after setting RNGFND_MAX_CM to 4000 the issue disappeared. Terrain following works now like a sharm :slight_smile: Big thanks for everyone helping me resolve this issue!

great news, thanks for the feedback.