Skip to content

Potential Base Azimuth Misalignment in VLS-128 PointCloud2: blocks 8–11 use wrong base rotation #569

@yuntaz0

Description

@yuntaz0

Please complete the following information:

  • OS and Version: Ubuntu 22.04
  • ROS Version: ROS2
  • Built from Source or Downloaded from Official Repository: Unknown
  • Version: Unknown

Describe the bug
In velodyne_pointcloud/src/lib/rawdata.cpp line 500

There is an azimuth assignment error in the per-block handling of VLS-128 packets.
Each VLS-128 packet contains 3 firing sequences, and each firing sequence spans exactly 4 blocks. All 4 blocks within a firing sequence share the same base azimuth.

However, in the current implementation, blocks 4–11 are grouped together and treated as if they belong to a single firing sequence, which causes the third firing sequence (blocks 8–11) to be assigned the wrong base azimuth.

Specifically, blocks 8–11 should use raw->blocks[8].rotation as their base azimuth, but the code assigns them raw->blocks[4].rotation, which corresponds to the previous firing sequence.

To Reproduce
Steps to reproduce the behavior:

  1. Record an MCAP file containing both raw LiDAR packets and the derived PointCloud2 message (using single-return mode with the strongest return).
  2. Play back the MCAP file in Foxglove.
  3. Visualize the raw LiDAR packets using Foxglove’s built-in LiDAR/packet visualization (which renders the packets correctly).
  4. Switch the visualization to PointCloud2 message and observe that, within each group of three points on the same ring, two points appear horizontally very close to each other. This repeating pattern suggests that one firing sequence per packet is assigned an incorrect base azimuth during packet-to-point cloud conversion.

Expected behavior
Each group of 4 blocks should be treated as an independent firing sequence:

Blocks 0–3 → base azimuth = blocks[0].rotation
Blocks 4–7 → base azimuth = blocks[4].rotation
Blocks 8–11 → base azimuth = blocks[8].rotation

The resulting PointCloud2 should preserve the correct angular spacing and that points along each laser ring are distributed uniformly.

Additional context
This issue is subtle and may not be immediately visible. I would be happy to provide visual evidence if it would be helpful. Unfortunately, I do not personally own most of the MCAP data, so please let me know what type of evidence would be most useful, and I will try to coordinate with my teammates to provide it.

Thank you very much for maintaining this project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions