← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

No memory for the terrain database

Stops itMissions, fence, rally points, terrain

What ArduPilot says:

The terrain database could not get the memory for its working store: TERRAIN_CACHE_SZ blocks (12 by default) of about 1.8 kB each. It stays off until the next reboot: no terrain heights, so waypoints with heights above terrain and terrain following do not work. Arming is refused as well, with “Terrain out of memory”, whether or not the flight needs terrain.

What to do, most likely first

  1. The board is short of memory: scripting, many enabled features, or a raised TERRAIN_CACHE_SZ.

    CheckOther out-of-memory messages appear at start-up, and the ground station shows little free memory.

    FixPut TERRAIN_CACHE_SZ back to 12 if it was raised, free memory by switching off features you do not use (scripting is usually the largest), and reboot.

  2. Terrain is on although nothing in your flying uses it.

    FixIf no mission uses heights above terrain and no terrain following is set, set TERRAIN_ENABLE to 0 and reboot: the memory is then never asked for.

Parameters to look at

ParameterWhat it is
TERRAIN_CACHE_SZTerrain cache size
TERRAIN_ENABLETerrain data enable
The code that sends it

Terrain: Allocation failed

libraries/AP_Terrain/AP_Terrain.cpp AP_Terrain::allocate() · Open in ArduPilot Copter-4.7.1

Written here for Copter 4.6. In the tool you choose your vehicle and version, see your own parameter values beside the ones named here, and drop a flight log to have every message in it explained.

Open it in the Message & Error Explainer