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.
Version What version was the issue encountered with
V3.6.0-rc12 Platform
[ ] All
[ ] AntennaTracker
[x] Copter
[ ] Plane
[ ] Rover
[ ] Submarine
Airframe type What type of airframe (flying wing, glider, hex, Y6, octa etc)
HeliQuad Hardware type What autopilot hardware was used? (Pixhawk, Cube, Pixracer, Navio2, etc)
The cube
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.
@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.
@rmackay9
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?
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.
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?
@ppoirier,
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).
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.
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.
@Max_Drougge
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