Function ouster::sdk::algorithm::align_clouds(const ouster::sdk::core::LidarFrame&, const ouster::sdk::core::LidarFrame&, const core::Matrix4dR&)

Function Documentation

core::Matrix4dR ouster::sdk::algorithm::align_clouds(const ouster::sdk::core::LidarFrame &source_frame, const ouster::sdk::core::LidarFrame &target_frame, const core::Matrix4dR &initial_guess = core::Matrix4dR::Identity())

Estimate frame-to-frame alignment from two high-level lidar frames.

Returns source_to_target_transform: points from source_frame are transformed by the returned pose into the fixed target_frame frame.

Dewarps and extracts features using per-column poses and sensor_info.sensor_to_body. The rotation component is expected to be gravity-aligned; the full existing extrinsic, including translation, is used as the initial prior. The caller is responsible for setting a gravity-aligned extrinsic (e.g. computed from IMU data) before calling; the function does not read IMU fields or perform any internal gravity estimation.

Ground segmentation is applied to filter ground points from the XY features used for initial yaw/translation matching. If the source frame already carries a "GROUND" field (written by GroundSegEngine), it is reused directly; otherwise ground segmentation is computed during the call.

Parameters:
  • source_frame[in] Source frame.

  • target_frame[in] Target frame.

  • initial_guess[in] Initial estimate of source_to_target_transform in the extrinsic-applied frame (the frame produced by xyzlut(extrinsics=True)).

Throws:

std::invalid_argument – If a frame lacks a RANGE field or sensor_info.

Returns:

Estimated source_to_target_transform in the extrinsic-applied frame.