rko_lio.dataloaders.raw module

Raw Dataloader

A file-based dataloader for datasets laid out as plain files:

dataset_root/
├── transforms.yaml        # required: 4x4 extrinsics
├── imu.csv                # required: one IMU file (.csv or .txt)
├── lidar/                 # required: one .ply per scan, named <ns>.ply
│   ├── 1662622237000000000.ply
│   └── ...
└── rko_lio_settings.yaml  # optional: overrides (see below)
  • transforms.yaml defines T_imu_to_base and T_lidar_to_base, each a 4x4 matrix. See Extrinsics and conventions.

  • The IMU CSV has a header row; default columns are timestamp, gyro_x, gyro_y, gyro_z, accel_x, accel_y, accel_z (timestamp in nanoseconds, rest SI). Extra columns are ignored.

  • lidar/ holds one .ply per scan; the filename stem is the scan timestamp in nanoseconds. A per-point time field (time, timestamps, timestamp or t) is used for deskewing when present, with units and absolute/relative detected automatically; clouds without one fall back to the filename stamp (disable deskewing with deskew: false in a -c config).

Defaults can be overridden with an optional rko_lio_settings.yaml:

imu:
  path: imu.csv                            # IMU file, if not auto-detected
  timestamp_multiplier_to_nanoseconds: 1   # e.g. 1e9 if the CSV time is in seconds
  headers:                                 # map expected name -> your column name
    timestamp: my_stamp_col                # gyro_x/y/z, accel_x/y/z likewise
lidar:
  path: lidar                              # lidar subfolder name
  file_suffix: .ply
  filename_timestamp_multiplier_to_nanoseconds: 1
class rko_lio.dataloaders.raw.RawDataLoader(data_path: Path, timestamp_config: TimestampConfig, *args, **kwargs)

Bases: object

property extrinsics
rko_lio.dataloaders.raw.read_point_cloud_file(path)

Read a .ply point cloud and return (points, times).

points is an (N, 3) float64 array. times is an (N,) float64 array of per-point times if the cloud has a recognised time field, else None (units/absolute-vs-relative are left to _process_timestamps).