rko_lio.config module

The C++ backend (rko_lio::core::process_timestamps) tries to automatically decide whether a LiDAR timestamp sequence is absolute (already aligned to wall-clock time) or relative (offsets that must be shifted by the message header time). If the data cannot be confidently classified as either, this error is thrown:

Cannot classify LiDAR timestamps as absolute or relative.

When this error occurs, you can potentially adjust the lidar_timestamps section of your configuration file to fix the issue. Specifying one of force_absolute or force_relative should do the trick.

Example (default configuration)

your other configuration keys here
lidar_timestamps:
  multiplier_to_seconds: 0.0
  force_absolute: false
  force_relative: false

Description of parameters

  • multiplier_to_seconds:

    Factor applied to raw timestamp values to convert them to seconds. Seconds and nanoseconds are detected automatically when this is 0.0 (default). Specify this for any other case. For example, if timestamps are in microseconds, use 1e-6.

  • force_absolute:

    If set, timestamps are always treated as absolute, bypassing heuristics.

  • force_relative:

    If set, timestamps are always interpreted as relative to the LiDAR message header time, bypassing heuristics.

Note

First, absolute timestamps are checked for. Then, relative. If the heuristics are still not satisfied, then the above described error is thrown.

class rko_lio.config.LIOConfig(deskew: bool = True, max_iterations: int = 100, voxel_size: float = 1.0, max_range: float = 100.0, min_range: float = 1.0, convergence_criterion: float = 1e-05, max_correspondence_distance: float = 0.5, max_num_threads: int = 0, initialization_phase: bool = False, max_expected_jerk: float = 3.0, double_downsample: bool = True, min_beta: float = 200.0)

Bases: object

LIO configuration options.

Parameters:
  • deskew (bool, default True) – If True, perform scan deskewing.

  • max_iterations (int, default 100) – Maximum optimization iterations for scan matching.

  • voxel_size (float, default 1.0) – Size of map voxels (meters).

  • max_range (float, default 100.0) – Max usable range of lidar (meters).

  • min_range (float, default 1.0) – Minimum usable range of lidar (meters).

  • convergence_criterion (float, default 1e-5) – Convergence threshold for optimization, on the relative change in cost per iteration.

  • max_correspondence_distance (float, default 0.5) – Max distance for associating points (meters).

  • max_num_threads (int, default 0) – Max thread count (0 = autodetect).

  • initialization_phase (bool, default False) – Whether to initialize on the first two lidar message.

  • max_expected_jerk (float, default 3.0) – Max expected IMU jerk (m/s^3).

  • double_downsample (bool, default True) – Double downsamples the incoming scan before registering. Disabling for sparse LiDARs may improve results.

  • min_beta (float, default 200.0) – Minimum scaling on the orientation regularisation weight. Set to -1 to disable the cost.

convergence_criterion: float = 1e-05
deskew: bool = True
double_downsample: bool = True
initialization_phase: bool = False
max_correspondence_distance: float = 0.5
max_expected_jerk: float = 3.0
max_iterations: int = 100
max_num_threads: int = 0
max_range: float = 100.0
min_beta: float = 200.0
min_range: float = 1.0
to_dict()
to_pybind() rko_lio.rko_lio_pybind._LIOConfig
voxel_size: float = 1.0
class rko_lio.config.PipelineConfig(lio: LIOConfig | None = None, lidar_timestamps: TimestampConfig | None = None, extrinsic_imu2base_quat_xyzw_xyz: list | None = None, extrinsic_lidar2base_quat_xyzw_xyz: list | None = None, viz: bool = False, dump_deskewed_scans: bool = False, log_dir: Path = PosixPath('results'), run_name: str | None = None)

Bases: object

Configuration for the LIOPipeline, wrapping both LIO- and timestamp-related configs.

Parameters:
  • lio (dict or LIOConfig)

  • lidar_timestamps (dict or TimestampConfig) – Configuration for timestamp preprocessing.

  • extrinsic_imu2base_quat_xyzw_xyz (list or None, optional) – Extrinsic from IMU to base as [qx, qy, qz, qw, x, y, z].

  • extrinsic_lidar2base_quat_xyzw_xyz (list or None, optional) – Extrinsic from lidar to base as [qx, qy, qz, qw, x, y, z].

  • viz (bool, default False) – Enable visualization using rerun.

  • dump_deskewed_scans (bool, default False) – Save deskewed scans to disk, in the base frame.

  • log_dir (Path, default "results") – Directory to store trajectory results.

  • run_name (str, default "rko_lio_run") – Name of the current run.

dump_deskewed_scans: bool = False
extrinsic_imu2base_quat_xyzw_xyz: list | None = None
extrinsic_lidar2base_quat_xyzw_xyz: list | None = None
classmethod from_dict(args: dict)
lidar_timestamps: TimestampConfig | None = None
lio: LIOConfig | None = None
log_dir: Path = PosixPath('results')
run_name: str | None = None
to_dict()
viz: bool = False
class rko_lio.config.TimestampConfig(multiplier_to_seconds: float = 0.0, force_absolute: bool = False, force_relative: bool = False)

Bases: object

force_absolute: bool = False
force_relative: bool = False
multiplier_to_seconds: float = 0.0
to_dict()
to_pybind() rko_lio.rko_lio_pybind._TimestampProcessingConfig