ouster-lidar / ouster-sdk

Ouster, Inc. sample code
Other
464 stars 438 forks source link

Range field of Point.h is always equal to the reflectivity value #264

Closed Betschler closed 3 years ago

Betschler commented 3 years ago

Hi,

The range and the reflectivity value are always the same. A fix would be lovely :)

I am working with an Ouster OS1-32 Gen 2 as a perceptional Sensor for a positioning system. The firmware of the sensor is v2.0.0. I downloaded the package, fired it up in my room, and watched it with rviz. Somehow the range value seems not to be right. The image shows my room and the stuff inside. The colormap is not inverted and displays the range value by intensity.

The very reflective jacket gets a way higher range value than everything around it. It seems to be a bug in the software package since it looks fine when watching the range value in OusterStudio.

Here again the image by rviz with the code of this website. image Here in OusterStudio: image

After a while of playing around with the point cloud showing this strange behaviour, I noticed that the range and the intensity value of the range and reflectivity are the same.

Thanks in advance.

kairenw commented 3 years ago

Hi @Betschler,

That's correct: the sensor returns range measurements, which should return lower values for closer objects and higher values for farther-away ones.

I'm having a little trouble interpreting what your screenshot indicates. Perhaps you could tell us what you're looking for and how you generated the cloud?

versatran01 commented 3 years ago

You might want to check if the colormap is inverted in rviz

kairenw commented 3 years ago

@Betschler -- Oh I see! Thank you for the clarifications.

I believe we fixed this bug in PR #239 in ros.cpp. Are you on the latest version?

Betschler commented 3 years ago

Sorry for the late reply, and thanks for the help.

It was indeed a bug that snuck into our local versioning resulting in the ros.cpp not updating anymore. After fixing the bug and updating the ros.cpp, everything works fine again.

Best regards!