rko_lio.util module

rko_lio.util.error(*args)
rko_lio.util.error_and_exit(*args)
rko_lio.util.height_colors_from_points(points: numpy.ndarray, color_map=numpy.array) numpy.ndarray

Given Nx3 array of points, return Nx3 array of RGB colors (dtype uint8) mapped from the z values using the colormap. Default colormap is viridis. Colors are uint8 in range [0, 255].

rko_lio.util.info(*args)
rko_lio.util.log_vector(rerun, entity_path_prefix: str, vector)

Logs a vector as three scalar time-series in rerun.

Parameters:
  • rerun – rerun module

  • entity_path_prefix – Base path for scalar logs (e.g. “imu/avg_acceleration”)

  • vector – Iterable or np.ndarray with 3 elements (x, y, z)

rko_lio.util.log_vector_columns(rerun, entity_path_prefix: str, times: numpy.ndarray, vectors: numpy.ndarray)

Log a batch of 3D vectors over multiple timestamps in rerun, sending one column batch per vector axis.

Parameters:
  • rerun – rerun module or rerun instance.

  • entity_path_prefix – base path e.g. ‘imu/acceleration’.

  • times – 1D np.ndarray of timestamps (float64).

  • vectors – 2D np.ndarray, shape (N, 3) where columns are x,y,z.

rko_lio.util.quat_xyzw_xyz_to_transform(quat_xyzw_xyz: np.ndarray | list | None) numpy.ndarray

Convert [qx, qy, qz, qw, x, y, z] to 4x4 transform.

rko_lio.util.save_scan_as_ply(scan: numpy.ndarray, end_time_seconds: float, output_dir: Path)

dumps the scan as PLY. The filename is <nanoseconds_as_int>.ply based on end_time_seconds.

rko_lio.util.transform_to_quat_xyzw_xyz(T: numpy.ndarray)

Convert 4x4 transform matrix to [qx, qy, qz, qw, x, y, z].

rko_lio.util.warning(*args)