Function ouster::sdk::algorithm::align_clouds(const ouster::sdk::core::FrameSet&)

Function Documentation

std::vector<core::Matrix4dR> ouster::sdk::algorithm::align_clouds(const ouster::sdk::core::FrameSet &frames)

Align every valid frame in a FrameSet to the first frame.

For three or more valid frames, runs all-pairs initial XY/yaw matching, keeps a consistency-checked spanning tree, then refines the tree with XY/yaw, Z-only, and full 6-DoF passes. Two valid frames use the pairwise alignment path directly. The input frames are expected to already have gravity-aligned sensor_info.sensor_to_body rotations; the full existing extrinsics, including translations, are used as initial priors. The first returned transform is the first frame’s existing extrinsic; each subsequent transform is the frame’s input extrinsic left-multiplied by the estimated correction.

Parameters:

frames[in] Frame set to align. frames[0] must be valid and is used as the anchor.

Throws:
  • std::invalid_argument – If frames[0] is null, or a frame lacks a RANGE field or sensor_info.

  • std::runtime_error – If the spanning-tree matching cannot connect all sensors.

Returns:

One 4x4 aligned extrinsic matrix per frame in frames. For each frame after the anchor, the alignment component follows the source_to_target_transform convention, with that frame as source and frame 0 as target.