|
Re: LIDAR Sensor has arrived!
We have 2 of these and played with them today with LabVIEW. We have been unable to get them to work with the native I2C port on the roborio. However, we have them working just fine on the MXP expansion I2C with identical code. We've pinned them out, swapped the lasers themselves, and still have zero luck with the native port.
The native port DOES know the sensor is connected. We received read and read/write errors stating that the device is busy. This is different that the 'resource not found' error we get when the device is not plugged into to power or not plugged into the I2C.
On the MxP I2C port we are reading then writing in alternating 20 ms loops. We lowered the timing of these loops incrementally until we started getting errors. At 10 ms polling we receive all zeros, at 15 ms we receive data, so 20 ms is where we are (50 hz). We average 5 loops in a moving average filter and the data looks very good.
I know we can improve this by doing the write then checking for the ready bit, but this worked just as well and gave us a resolution we're happy with. Plus after 6 hours of banging our head against the native port we were already pretty frustrated.
We have noticed that when the sensor was aiming at the ceiling and our flourescent lights we got highly inaccurate results.
|