最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How should the LIDAR Raw Data be read? - Stack Overflow

programmeradmin2浏览0评论

I have been working on understand the working of lidar and in this attempt I am working with a Solid State LIDAR and I have used USB 2.0 protocol to connect with lidar and successfully received a 1D array data stream.

I need help in understanding this data in order to further use this for my use case.

Following is the raw data:

When I place my hand close to the lidar emitter all values turn 255 and when I am far it is 7

Received 512 bytes: [7, 1, 7, 1, …, 7, 1, 7, 1]
Reading LiDAR Data...
Received 512 bytes: [7, 1, 7, 1, …, 7, 1, 7, 1]
Reading LiDAR Data...
Received 512 bytes: [7, 1, 7, 1, …, 7, 1, 7, 1]
Reading LiDAR Data...
Received 512 bytes: [7, 1, 7, 1, …, 255, 3, 255, 3]
Reading LiDAR Data...
Received 512 bytes: [255, 3, 255, 3, …, 255, 3, 255, 3]
Reading LiDAR Data...
Received 512 bytes: [255, 3, 255, 3, …, 255, 3, 255, 3]

I have been working on understand the working of lidar and in this attempt I am working with a Solid State LIDAR and I have used USB 2.0 protocol to connect with lidar and successfully received a 1D array data stream.

I need help in understanding this data in order to further use this for my use case.

Following is the raw data:

When I place my hand close to the lidar emitter all values turn 255 and when I am far it is 7

Received 512 bytes: [7, 1, 7, 1, …, 7, 1, 7, 1]
Reading LiDAR Data...
Received 512 bytes: [7, 1, 7, 1, …, 7, 1, 7, 1]
Reading LiDAR Data...
Received 512 bytes: [7, 1, 7, 1, …, 7, 1, 7, 1]
Reading LiDAR Data...
Received 512 bytes: [7, 1, 7, 1, …, 255, 3, 255, 3]
Reading LiDAR Data...
Received 512 bytes: [255, 3, 255, 3, …, 255, 3, 255, 3]
Reading LiDAR Data...
Received 512 bytes: [255, 3, 255, 3, …, 255, 3, 255, 3]
Share Improve this question edited Mar 14 at 15:01 Darkproduct 1,2631 gold badge17 silver badges35 bronze badges asked Mar 11 at 9:36 monsieur_vnnmonsieur_vnn 413 bronze badges 4
  • 1 Which LiDAR do you use? Lookup the datasheet there should be an explanation on the protocol. – Darkproduct Commented Mar 13 at 10:46
  • I'm using CS20 TOF Solid State Lidar. Here is the Lidar Manual: support.tofsensors/product/CS20/spec/… I am new to learning and experimenting on lidar, any clarification on the data perceived would be of great help! Thanks! – monsieur_vnn Commented Mar 14 at 14:06
  • I found this webpage where you can download the SDK. Unfortunately, all the comments are in Chinese. There is also this project which is a ROS2 driver, but there is no readme and I'm not sure if this is working. I think you are supposed to use the SDK. – Darkproduct Commented Mar 14 at 15:45
  • Thank you I have used the SDK and got the desired but I am also trying to create an application without using SDK to achieve the results... It should be possible right? – monsieur_vnn Commented Mar 17 at 16:19
Add a comment  | 

1 Answer 1

Reset to default 0

Without knowing exactly which hardware you are using it is difficult to give an explanation.

From my experience working with 2D LiDARs this type of data return is common. The data is normally encoded in cylinder coordinates.

Using the Index as angle and the value as distance. The distance is usually a floating point value in meter and the Index can be converted to the angle with a formula like this:

With

  • ϕ : Angle of the ray which measured the distance at index i.
  • α : Start angle. Normally on the left right side at index 0.
  • β : Angle increment. Angle between two neighboring rays.
  • i: Index into the data array.

EDIT: Index 0 is normally on the right side. See sick_scan docs!

Here a visualization of a 2D LiDAR with 7 rays and 180° opening angle. The angle increment is 30°. And the starting angle is -90°.

The data array would look something like this: [inf, 0.7, inf, 0.7, 0.6, inf, inf]. The corresponding angles would be: [-90, -60, -30, 0, 30, 60, 90].

For demonstration purposes I used degrees for all angles, normally this would be calculated in radians.

发布评论

评论列表(0)

  1. 暂无评论