I’ve connected and configured a RPLidar C1M1 to a pixhawk 2.4.8 clone. It is starting and I do get values on the proximity ‘radar’ screen but it’s just random scans all over the place. If I move the lidar unit it seems to get some reset command from the pixhawk and starts spinning again with junk data.
The display looks great in the slamtek robostudio tool.
I’ve triple checked all the settings and even tried it on a holybro h743 wing and I get the same random junk.
Maybe a bad unit? Something with the C1M1 compatibility?
To add to this: the “laser position” is green but turns red when the FC sends the reset to the lidar. It happens every few seconds. I can’t seem to find what “laser position” means
Well I think I know what is going on. The C1M1 puts out data at a rate that overwhelms the FC. It is hardcoded at 460800 bps and the AP_Proximity_RPLidarA2 code just reads from the uart buffer as it’s given time by the scheduler so it misses a bunch of data. I’m not sure if the serial port could be refactored to be interrupt driven instead of polled reads(); I haven’t studied the code to that extent.
Changing the scheduler to 2000 cleaned it up (mostly) but that creates a whole new set of problems.