Using LIDAR data for terrain following

Hi Folks,

I’m putting together a mapping drone with a LIDAR sensor. The LIDAR sensor data is being processed by an onboard raspberry pi.

My first question is how best to transmit the data using the existing Ardupilot codebase. Looking at the supported devices, it seems emulating something like a Lightware SF10/SF11 would be pretty easy and given that sensors range, it allow me to enable ground following at my target heights of 80-100m.

Ulitmately I would like the LIDAR to provide a ground level for terrain following but also the highest treetop distance it can see for obstacle avoidance. So for example, I’d like to terrain follow at 80m, but maintain a minimum vertical separation from any obstacle of 20m. How hard is this to achieve?

I’m guessing since this will require modifing the terrain following code this is going to end up a bit complicated and probably wouldn’t make it into the main codebase as it’s a bit of a specialised use case. In which case I might be better off just sending a single terrain height and artificially decreasing this on the Pi if the Pi knows that the target height would lead to insufficient separation.

Many thanks!

Hi @klaash,

It would make most sense to transmit the distances from the RPI to the autopilot using MAVLink probably using the DISTANCE_SENSOR message. Then within ArduPilot you could set RNGFND1_TYPE = 10 (MAVLink).

Tracking two heights with a single lidar is tricky but it might be possible if the lidar is able to provide multiple returns instead of just the strongest.

This issue comes up in other situations as well though including flying over fields of crops.

If you find that one of ArduPilot’s existing supported rangefinders support returning multiple distances one of us might be able to help modify the C++ driver and the surface tracking / terrain following feature to do what you’re looking for.

Will a depth map sensor under mount works?
Darkest (my guess) for terrain follow
Lightest (my guess) for obstacle separation avoidance.

Connect to Pi or Jetson product, companion computer + Arducopter altitude info, mission and control flying.

Ha ha ha, having said that, I haven’t successfully take off a Arducopter by companion computer yet, very close to first flight.

Just to join in hope to learn from others.

1 Like

Going the lidar way, you would probably have to design a filter that can distinguish the ground vs the leaves and branches. The ground should be the furthest values measured, and should not change drastically. If the lidar also returns the intensity of the reflection, that could be another input to a filter.

RGB-D cameras would probably work, but it would depend on how dense the leaves coverage is. But I think RGB-D work at most at 20 meters. Maybe there are recent improvements I dont know of. But you’d also have to design some sort of filter to keep the ground distance in memory, since depending on the leaf coverage you might not see the ground at all times.

Unfortunately, unless you find someone who has already done something similar to what you’re trying to do (I’d start by spending a few hours on Google Scholar), this is a situation where testing is inevitable.

But you don’t have to have a working solution to test. Create yourself datasets : fly your drone with your lidar, without using the lidar measurements, but log everything the lidar outputs. Then after the flight, with the logged position/Attitude from the Ardupilot log and with the lidar log, it will be easier for you to figure out a way to use the lidar data to estimate altitude-above-ground.

2 Likes