How to determine the Lidar vertical field of view configuration from data?

35 Views Asked by At

I'm analyzing a point cloud dataset captured by a lidar sensor and have a question regarding its Vertical Field Of View (VFOV) channel configuration. The dataset documentation suggests the VFOV configuration shown in the this image-->(https://drive.google.com/file/d/1L2QD4mYfJeqU6k0e1uxcw1r_W6CHTJ08/view?usp=sharing), but my analysis-->(https://drive.google.com/file/d/1ITacS5Eu4RGiN_gKaZ9jRBjrHAVyFWbJ/view?usp=sharing) of the data implies a different setup. Specifically, the data near the origin (where the lidar is located) was captured by channel/lidar_beam 63, and as the distance from the origin increases, the channel number decreases sequentially down to channel 0. This pattern suggests that the channels are arranged vertically from bottom to top in the order of 63 to 0 rather than the even/odd pattern suggest by the (https://drive.google.com/file/d/1L2QD4mYfJeqU6k0e1uxcw1r_W6CHTJ08/view?usp=sharing). Can you provide insights or confirm if my understanding of the channel configuration being 63 (lowest) to 0 (highest) along the z-axis is correct? The image-->https://drive.google.com/file/d/1ITacS5Eu4RGiN_gKaZ9jRBjrHAVyFWbJ/view?usp=sharing was created using the following code and this point cloud file-->https://drive.google.com/file/d/1NtILkdSU8G3rzjpeogGLZUqZAQdEk485/view?usp=sharing.(please add the file path on line 5) The point cloud file is in .bin format. Each point has 5 attributes x,y,z,intensity,lidar_beam.

import numpy as np
import plotly.graph_objects as go

# Load the point cloud data
point_cloud = np.fromfile('/path/to/the/bin/file.bin', dtype=np.float32).reshape(-1, 5)

# Extract x, y, z coordinates and lidar beam IDs
x = point_cloud[:, 0]
y = point_cloud[:, 1]
z = point_cloud[:, 2]
lidar_beam_ids = point_cloud[:, 4]

# Create a scatter plot
fig = go.Figure(data=[go.Scatter3d(
    x=x,
    y=y,
    z=z,
    mode='markers',
    marker=dict(
        size=2,  # Adjust marker size as needed
        color=lidar_beam_ids,  # Set color to lidar beam IDs
        colorscale='Viridis',  # You can choose other color scales
        colorbar=dict(title='Lidar Beam ID'),
    ),
    text=lidar_beam_ids,  # Text to display on hover (lidar beam IDs)
    hoverinfo='text'
)])

# Set plot layout
fig.update_layout(
    title='Point Cloud with Lidar Beam IDs',
    scene=dict(
        xaxis_title='X Axis',
        yaxis_title='Y Axis',
        zaxis_title='Z Axis'
    )
)

# Show the figure
fig.show()
0

There are 0 best solutions below