OS2 128 Intensity Values

Hello, I am using the lidar_replay sample to get individual bin files for each lidar frame. I noticed that the values for intensity have a range from 0 to 2000s depending on the drive. However, in the documentation for dwLidarPointXYZI it states that the range should be within 0 to 1. Is there a reason for this difference?

I also observe this behavior in the lidar file included with the sample: “/samples/sensors/lidar/lidar_os2128_v5.bin”.

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version

Target Operating System

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version

Host Machine Version
native Ubuntu 18.04

Hi @jan268,

May we know the command you run to replay the file to observe the issue? Thanks.

The command below saves individual frames as bin files to the output-dir. “/samples/sensors/lidar/lidar_os2128_v5.bin” is the default for --param=file=/samples/sensors/lidar/lidar_os2128_v5.bin

./sample_lidar_replay --protocol=lidar.virtual --show-intensity=true --output-dir=/path/to/save/folder

Then in python I can decode individual bin files using the following two approaches:

import struct
import numpy as np

file_name = "/path/to/bin/file"

# numpy method
pointcloud = np.fromfile(file_name, dtype=np.float32)
pointcloud = pointcloud.reshape((-1,4))

# struct method
with open(file_name, "rb") as f:
	n = 131072*4 # number of points times number of fields (x,y,z,i)
	pointcloud = struct.unpack('f'*n, f.read(4*n)) 
	pointcloud = np.asarray(pointcloud)
	pointcloud = pointcloud.reshape((-1, 4))

The shape of the array for both methods is (131072, 4) where the last column is intensity. Both produce the same results.

We can observe the range is out of 0~1.
We will check with the internal team and get back to you. Thanks.

Do you see the out-of-range issue with any other lidar or only lidar_os2128_v5.bin?

We observe it with our own Ouster os2 128 lidar.

You observed intensity with range of 0~1 for lidar_os2128_v5.bin? May I know how you verified this?

Could you share your command of running sample_lidar_replay with the lidar?

I just examined it with gdb.

This is a bug of not scaling intensity to [0, 0] in the decoder in DriveWorks 3.5 release.

As far as I know, Ouster will publicly release for their new plugin (based on DriveWorks 3.5 and 4.0) that covers all models with the latest FW within the next days.
We would suggest you contact Ouster, and make sure they can inform you once available.

Okay, thank you for the response.