We are flying with ArduCopter 4.2.1 installed. TERRAIN_ENABLE = 0. WPNAV_RFND_USE = 1. We take of in auto and then get the message: FAILSAFE: Terrain Data Missing. We use a radar rangefinder that works very reliably. We have tested it and have the logs showing that the measurement is accurate and good. Range finder settings are:
RNGFND1_MAX_CM = 9500
RNGFND1_MIN_ CM = 5
RNGFND1_ORIENT = 25
Our target altitude is 30 m above ground, so well within the rangefinder settings. The rangefinder is working reliably at the 30 m altitude mark.
We can fly and perform terrain follow with TERRAIN_ENABLE = 1 when we have the relevant STRM data. When we remove the data and set TERRAIN_ENABLE = 0, we get the error.
Similar issues has been reported in the past. Notably in 2020. None has a resolution for this issue. Is this a bug?
Bruno, it tells me the file is too large to upload here. I placed it in Google Docs. Here is the link: Google Drive: Sign-in
Let me know if that did not work and I will make another plan. This log is typical of what we see. The drone takes off, then fail save and RTL.
Here is the parameter file:
I requested access to download your log in Google Drive.
By your parameter list, I saw that you are using a DroneCAN Rangefinder (RNGFND1_TYPE = 24). I am not super into this sensor, but have you properly configured your CAN parameters?
from this you can see that the readout looks good (at least to me). The drone takes off and then when it is about at altitude, 35 m as per flight plan, it goes into RTL with the Fail Save: Terrain Data Missing.
Check this out, I have just plotted your Rangefinder Status along the distance, and check out how many “No Data” reports (status = 1) your rangefinder driver is reporting:
But anyway, I don’t believe this is the root cause, despite of being strange. The failsafe is triggered when the drone starts wp navigation, so I think this is related to terrain databases. Check your SD card, it should have a folder named “TERRAIN”. Erase all the files inside it and try again. Maybe your system is trying to retrieve terrain database for that region in this folder, not finding anything and retrieving the error. This could explain why your takeoff by terrain coordinates are successful but navigation triggers the failsafe. Also double check that you have parameter TERRAIN_ENABLE set to zero.
Thank you Bruno. We have deleted the terrain data file for the test that I shared. I have noticed periodic “No Data” reports. But am not sure why that is happening. We send a range signal to the flight controller every 200 ms (adjustable). Perhaps it is looking for a data point at shorter intervals? Would that be a possibility?
Thank you. Seems like we will have to get our edge computer to handle the terrain following as all posts I have checked out since about 2016 showed no solution.
That’s pretty strange. Maybe formatting the SD Card could help?
I had a similar trouble years ago, but really do not remember how we managed this, simply came back to proper work.
Really not sure about it, but I think this interval is too slow for it. If I remember well, 200ms is the interval that ardupilot interprets as no data for the rangefinders, so try to send it faster, at least 50ms interval (20Hz) would be nice and would clear all these “no data” statuses.
Henk,
Just out of curiosity, what radar altimeter are you using?
We flew with the CAN Ainstein US-D1 a month ago.
It was generally good, but unfortunately below ~30cm the reading would jump to between 230 and 270cm.
(Ours was mounted such that it was directly on the ground when landed so it caused issues with the aircraft being unsure that it had in fact landed.)
We would have preferred a nonsense number when below 30cm rather than a reasonable (but wrong) number within the 50cm to 4500cm range.