ROS 2 message definitions for structured lidar frames. The layout follows the spirit of the community LidarScan / LidarInfo proposal, adapted here for a planar (non-interleaved) channel layout in the scan buffer.
This package is a thin ament_cmake interface package: it only declares .msg files and generates C++, Python, and other language bindings via rosidl.
LidarScan— One time-synchronized structured frame: a 2D grid (height×width) of pixels, each pixel described by one or more named channels (range, reflectivity, near IR, etc.). All channel samples live in a singleuint8[] datablob; each channel is a contiguous block (seeLidarChannel).LidarInfo— Latched Lidar metadata message paired with scans: per-row / per-column angles (or uniform FOV fallbacks), optional per-beam azimuth offsets and timing fields, and range scaling so metres areraw * range_multiplier + range_offset.LidarChannel— Describes one channel insideLidarScan.data: name, byteoffset,datatype(same numeric IDs assensor_msgs/PointField), andcount(elements per pixel).
Together, LidarInfo + LidarScan are enough for drivers or libraries (for example lidar-conversions) to project range into Cartesian XYZ or to decode other fields without vendor-specific message types.
| Path | Role |
|---|---|
msg/LidarScan.msg |
Frame header, grid size, channel table, raw data[], endianness flag. |
msg/LidarChannel.msg |
Per-channel metadata and indexing formula for planar layout. |
msg/LidarInfo.msg |
Geometry, optional explicit angle tables, range calibration. |
CMakeLists.txt |
rosidl_generate_interfaces for the three messages; depends on std_msgs. |
package.xml |
Package manifest; member of rosidl_interface_packages. |
Channels are not interleaved per pixel. Each channel occupies one contiguous byte range in LidarScan.data, starting at LidarChannel.offset, with samples stored row-major over (height, width) and an inner dimension of length count. See the comments in LidarChannel.msg and LidarScan.msg for the exact indexing formula.