Quantcast
Channel: Arduino - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 747

Neato Lidar sensor and reading the serial data and making sense of it.

$
0
0

As a complete nube to arduino and processing i need some on to explain what all this means.

I have the Lidar sensor off a Neato vacuum basically it a spinning laser that measures distance.

This is the info i have about the data coming from the sensor.

I can do the part were i get the serial port and set the baud rate and on some of the serial libary examples the get a lot of data but none of it make sense.

if someone could explain to me on how to separate all this data i would really be grateful.

I don't want you to write the program for me cause i need to learn how to do this but i just don't know were to start

A full revolution will yield 90 packets, containing 4 consecutive readings each. The length of a packet is 22 bytes. This amounts to a total of 360 readings (1 per degree) on 1980 bytes.

Each packet is organized as follows: (start) (index) (speed_L) (speed_H) [Data 0] [Data 1] [Data 2] [Data 3] (checksum_L) (checksum_H)

where:

start is always 0xFA index is the index byte in the 90 packets, going from 0xA0 (packet 0, readings 0 to 3) to 0xF9 (packet 89, readings 356 to 359). speed is a two-byte information, little-endian. It represents the speed, in 64th of RPM (aka value in RPM represented in fixed point, with 6 bits used for the decimal part). [Data 0] to [Data 3] are the 4 readings. Each one is 4 bytes long, and organized as follows.

byte 0 : <distance 7:0> byte 1 : <"invalid data" flag> <"strength warning" flag> <distance 13:8> byte 2 : <signal strength 7:0> byte 3 : <signal strength 15:8>

As chenglung points out, the distance information is in mm, and coded on 14 bits. This puts the tests made by Sparkfun in a room of around 3.3m x 3.9m (11ft x 13 ft ?), which seems reasonable. The minimum distance is around 15cm, and the maximum distance is around 6m.

When bit 7 of byte 1 is set, it indicates that the distance could not be calculated. When this bit is set, it seems that byte 0 contains an error code. Examples of error code are 0x02, 0x03, 0x21, 0x25, 0x35 or 0x50... When it's 21, then the whole block is 21 80 XX XX, but for all the other values it's the data block is YY 80 00 00...

The bit 6 of byte 1 is a warning when the reported strength is greatly inferior to what is expected at this distance. This may happen when the material has a low reflectance (black material...), or when the dot does not have the expected size or shape (porous material, transparent fabric, grid, edge of an object...), or maybe when there are parasitic reflections (glass... ).

Byte 2 and 3 are the LSB and MSB of the strength indication. This value can get very high when facing a retroreflector.


Viewing all articles
Browse latest Browse all 747

Latest Images

Trending Articles



Latest Images