Lidar lite v3 offset value issue

Issue details

Please describe the problem
I’m using arducopter V3.6.0-rc12 on my pixhawk 2.1 (The cube) along with mission planner. I’m trying to integrate the Lidar Lite V3. The lidar is connected to the i2c port and shows distance values which are consistent with range readings. However, the values seem to be offset by a value of 9,24. I assume these values are in meters? I’ve tried the rngfnd_offset parameter, but it does nothing to the values. I’ve also tried the scaling parameter, but it does nothing to the value either. Does anyone know how to offset this 9,24 value as the rngfnd_offset doesn’t do anything.
I’ve followed the installation guide on the pixhawk home page.

Worth mentioning is that the lidar works fine on my arduino showing valid distance value without any offset.

What version was the issue encountered with
[ ] All
[ ] AntennaTracker
[x] Copter
[ ] Plane
[ ] Rover
[ ] Submarine

Airframe type
What type of airframe (flying wing, glider, hex, Y6, octa etc)
Hardware type
What autopilot hardware was used? (Pixhawk, Cube, Pixracer, Navio2, etc)
The cube

@Max_Drougge what type of range finder have you set ?
The V3 should be type 15 do not confuse with the High Performance : V3HP is type 21

It is set to 15. The weird thing is that offset and scaling parameters doesn’t change the behaviour at all.

Offset and Scaling are for analog sensors.
I’ll give it a try tonight., maybe the new HP driver mod impacted on the V3.
BTW, I confirm I have an offset on my V3 too, but it is like 15 cm (that I offset with _GNDCLEAR)

Ok. My sensor shows roughly 10.24 at one meter distance and roughly 9.74 at 0,5 meters. A 0,5 difference. At the same distances connected to Arduino Uno it shows roughly 104 cm and 50-60 cm at the different distances respectively.

You can demonstrate the it is the new driver release by loading a previous firmware release (2 months ago).

By the way, it looks like we have two parallel topics on this issue.

Yes. I thought that thread was dead so I created this one. Should I close this one or can we continue this thread?

@Max_Drougge, could you try it using Copter-3.6.0 under NuttX? If it works under NuttX but not under ChibiOS then that would point to the Garmin guys being correct.

I will try this. Is there a guide how to install NuttX?

Alright. I’ve tried the sensor with NuttX OS with copter 3.6.0. It’s pretty much the same result, but slightly different values. So I suppose the problem lies else where? However, it seems as the problem must be somewhere in mission planner or the code in the AP since the arduino shows the correct values?

1 Like


Great, thanks for testing that. This makes it clear that it’s not a NuttX vs ChibiOS issue which narrows down the problem to either the sensor itself or the driver.

Do you have a dataflash log of it misbehaving?

I just did a test with range from 1 m to roughly 75 cm. 3 1970-01-01 01-00-00.bin (178.2 KB)

Attaching the data flash log. Note that I am using a second pixhawk (the cube) with only the lidar connected to it. It still behaves the same as on the other fully connected pixhawk though.


You said you’ve tested with an Arduino Uno as well and do not see the offset. I guess i could find it by googling but could you point me at the software that is on the Uno? I’d like to see if it does anything differently than we do. I guess it uses I2C as well?

I guess you’re saying that you’ve got the same sensor as @Max_Drougge but you’re not seeing a large offset? (just a small offset of about 15cm).

Yes I used the arduino with i2c as well. I used the example code from Garmin. I2C lidarlitev3.txt (1.2 KB)
Attaching a copy of it.

I will test with latest releases this week end and report

Subscribing to this as I am also seeing the same offset values with my Garmin lidar lite v3, also keep getting “Bad LiDar health” errors intermittently while flying or on the ground.


It’s possible that the “bad lidar health” messages are caused by the lidar going out-of-range and an (incorrect) change in how we report the lidar health. We will fix this bad-reporting issue in 3.6.2.

1 Like

Thanks Randy, I’ll double check my range settings but I am pretty certain the max is set to 4000cm and I don’t fly over 30-50 feet AGL at my current zone since I’m only allowed 100’ by LAANC, being near an airport.

Did you get a chance to test it this week end?

1 Like

I tested with master code and I could not get my V3 started. From what I can see, the V3 and V3hp are sharing the same code… Need more testing