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, a std::runtime_error is thrown:

Runtime Error: TimestampProcessingConfig does not cover this particular
case of data. Please investigate, modify the config, or open an issue.

When this error occurs, you can potentially adjust the 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
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. Secondsd 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_points_per_voxel: int = 20, max_range: float = 100.0, min_range: float = 1.0, convergence_criterion: float = 1e-05, max_correspondance_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_points_per_voxel (int, default 20) – Maximum points stored per voxel.

  • 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.

  • max_correspondance_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_correspondance_distance: float = 0.5
max_expected_jerk: float = 3.0
max_iterations: int = 100
max_num_threads: int = 0
max_points_per_voxel: int = 20
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, timestamps: TimestampConfig | None = None, extrinsic_imu2base_quat_xyzw_xyz: list | None = None, extrinsic_lidar2base_quat_xyzw_xyz: list | None = None, viz: bool = False, viz_every_n_frames: int = 20, 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)

  • timestamps (dict or TimestampProcessingConfig) – Configuration for timestamp preprocessing.

  • extrinsic_imu2base (np.ndarray[4,4] or None, optional) – Extrinsic transform from IMU frame to base frame.

  • extrinsic_lidar2base (np.ndarray[4,4] or None, optional) – Extrinsic transform from lidar frame to base frame.

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

  • viz_every_n_frames (int, default 20)

  • dump_deskewed_scans (bool, default False) – Save deskewed scans to disk.

  • 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)
lio: LIOConfig | None = None
log_dir: Path = PosixPath('results')
run_name: str | None = None
timestamps: TimestampConfig | None = None
to_dict()
viz: bool = False
viz_every_n_frames: int = 20
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