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. Typically, 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
  absolute_start_threshold: 1
  absolute_end_threshold: 1
  relative_start_threshold: 10
  relative_end_threshold: 10
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. 
- absolute_start_threshold:- A tolerance around the earliest measured timestamp compared to header time. If its absolute difference to the header time is below this threshold, the scan is treated as absolute. - Units: milliseconds. 
- absolute_end_threshold:- Similar to the above, but applied to the latest scan timestamp. the absolute difference is compared to this threshold. - Units: milliseconds. 
- relative_start_threshold:- Used to check for relative timestamps. If the scan’s absolute minimum time is below this threshold, the timestamps are considered relative. - Units: milliseconds. 
- relative_end_threshold:- Also used for relative checks. If the scan’s absolute maximum time is below this threshold, the timestamps are considered relative. The expectation is the max time is either a very small negative or positive value. - Units: milliseconds. 
Note
First, absolute timestamps are checked for. Then, relative. If the threshold checks are still not satisfied, then the above described error is thrown.
- class rko_lio.config.LIOConfig(*args: Any, **kwargs: Any)¶
- Bases: - _LIOConfig- 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. 
 
 - default_config = {'convergence_criterion': 1e-05, 'deskew': True, 'double_downsample': True, 'initialization_phase': False, 'max_correspondance_distance': 0.5, 'max_expected_jerk': 3.0, 'max_iterations': 100, 'max_num_threads': 0, 'max_points_per_voxel': 20, 'max_range': 100.0, 'min_beta': 200.0, 'min_range': 1.0, 'voxel_size': 1.0}¶
 - to_dict()¶
- Return a dict version 
 
- class rko_lio.config.PipelineConfig(lio=None, timestamps=None, **kwargs)¶
- 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. 
 
 - default_config = {'dump_deskewed_scans': False, 'extrinsic_imu2base_quat_xyzw_xyz': None, 'extrinsic_lidar2base_quat_xyzw_xyz': None, 'log_dir': '/tmp/ws/docs_build/rko_lio/rko_lio/wrapped_sphinx_directory/results', 'run_name': None, 'viz': False, 'viz_every_n_frames': 20}¶
 - classmethod default_dict(include_timestamps: bool = False)¶
- Parameters:
- include_timestamps (bool, default False) – If True, include the timestamp subconfig. 
 
 - to_dict()¶
- Return full configuration as serializable dict. 
 
- class rko_lio.config.TimestampProcessingConfig(*args: Any, **kwargs: Any)¶
- Bases: - _TimestampProcessingConfig- default_config = {'absolute_end_threshold': 1, 'absolute_start_threshold': 1, 'force_absolute': False, 'force_relative': False, 'multiplier_to_seconds': 0.0, 'relative_end_threshold': 10, 'relative_start_threshold': 10}¶
 - to_dict()¶
- Return a dict version