Repository navigation
feat(common): load LiDAR frames from Parquet, PCD or bin by their own layout - #305
Merged
Merged
Conversation
This was referenced Oct 13, 2026
jacoblambert
force-pushed
the
v1/read-lidar
branch
from
October 14, 2026 11:10
6979f4e to
a850245
Compare
jacoblambert
force-pushed
the
v1/loader
branch
from
October 14, 2026 11:10
b1b891e to
634c0d0
Compare
jacoblambert
force-pushed
the
v1/loader
branch
from
October 15, 2026 03:21
634c0d0 to
de0781d
Compare
jacoblambert
force-pushed
the
v1/read-lidar
branch
from
October 15, 2026 03:36
a850245 to
aae294d
Compare
jacoblambert
marked this pull request as ready for review
October 15, 2026 06:16
jacoblambert
force-pushed
the
v1/loader
branch
from
October 15, 2026 08:26
de0781d to
c39b8ed
Compare
jacoblambert
force-pushed
the
v1/read-lidar
branch
from
October 15, 2026 08:26
aae294d to
7b87cd8
Compare
jacoblambert
force-pushed
the
v1/loader
branch
from
October 15, 2026 10:37
c39b8ed to
f197865
Compare
jacoblambert
force-pushed
the
v1/read-lidar
branch
from
October 15, 2026 10:37
7b87cd8 to
23eb6f3
Compare
jacoblambert
force-pushed
the
v1/loader
branch
from
October 21, 2026 01:31
f197865 to
bebb99e
Compare
jacoblambert
force-pushed
the
v1/read-lidar
branch
from
October 21, 2026 01:31
23eb6f3 to
c0996a4
Compare
ktro2828
approved these changes
Oct 21, 2026
jacoblambert
force-pushed
the
v1/loader
branch
from
October 22, 2026 09:44
bebb99e to
c796e9f
Compare
jacoblambert
force-pushed
the
v1/read-lidar
branch
from
October 22, 2026 09:47
c0996a4 to
6313f6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
load_pointcloud()int4_devkit/common/io.py: reads one LiDAR frame as one array per point field, in the dtype stored in the file.frame_indexpicks the frame. The layout comes from the file schema..bin(one file per frame): no header, so the layout comes fromfields(in 1.0,sensor.lidar.fields).columnsselects fields. Compression and encodings are read from the file and never set in the loader, so any writer settings load.Speed
Each Parquet file is opened once per process, memory-mapped, and cached (keyed by path, file mtime and process id, so a rewritten file or a forked worker gets its own handle). Measured on 60 real j6gen2
LIDAR_CONCATframes (~320k points):.binReopening re-reads the footer (~1.5 ms), memory mapping saves ~1 ms, and returning columns avoids a copy.
Changes to existing code
LidarPointCloud.from_filereads throughload_pointcloud, so it also reads Parquet (newframe_indexandfieldsarguments). For 0.x.binwithoutfields, the layout isV0_BIN_FIELDS(x, y, z, intensity, ring, return_type, time_stamp) cut tonum_pts_feats(5 by default, 7 with return type and time stamp), all float32, as the 0.x converter writes them. More than 7 fields raises instead of guessing names.SegmentationPointCloud.from_filereuses that code instead of its own copy. It is marked deprecated in its docstring: in 1.0, point labels are columns of the LiDAR frame. No runtime warning yet, since 0.x rendering still uses it and there is no replacement untilT4Devkitmoves to 1.0.RadarPointCloud: the docstring says it is a nuScenes placeholder (it reads the 18-field nuScenes radar PCD, while T4 radar is stored asRadarTracksJSON), andfrom_filewarns that T4 radar is not implemented. Radar is not part of 1.0 yet.Stampmoved tot4_devkit/common/timestamp.py; still importable fromt4_devkit.dataclass.Found while benchmarking (for the migration pilot)
pyarrow's default dictionary encoding hurts float compression. 60 frames: 317 MB with defaults, 181 MB with dictionary off and
BYTE_STREAM_SPLITon floats, 364 MB as 0.x.bin. Codec (zstd vs lz4) and encodings will be decided in the pilot, with the real writer.Tests
tests/common/test_io.py:columnsselects fields..bin: read with the layout given infields.tests/dataclass/test_pointcloud.py:LidarPointCloudreads a 1.0 frame from its Parquet row group..binwith 7 fields loads, and one with 8 raises..bintests forLidarPointCloudandSegmentationPointCloudstill pass.