Function ouster::sdk::algorithm::plumb_walls¶
Defined in File plumb.h
Function Documentation¶
-
nonstd::optional<core::Matrix4dR> ouster::sdk::algorithm::plumb_walls(const core::FrameSet &frames, const core::Matrix4dR &gravity_rotation = core::Matrix4dR::Identity())¶
Refine the gravity alignment of a frame set from its wall geometry.
Wall points are the pixels WallSegEngine marks WALL: near-horizontal normals on a continuous vertical surface large enough to be a wall, so clutter never votes. A frame that already carries a WALL field is read as it lies and never recomputed; the frames without one are segmented here under
gravity_rotation, in memory only. The set is never written to. The IMU is never consulted; the existing extrinsic orientation plusgravity_rotationis the anchor the refinement corrects. The pooled points are scored by projecting them along z and counting occupied grid cells: a plumb wall collapses to a thin line while a tilted one smears into a band, so the roll/pitch that minimizes the count renders the walls plumb. The wall point count, the solution and how sharp its minimum was are logged.Any frame carrying a RANGE image votes, lidar or camera; a color-only camera has no geometry to stand a wall on and simply contributes nothing.
- Parameters:
frames[in] Frame set to sample; typically the first of a stream. Each frame’s sensor_info extrinsics are assumed rigid and correct so the pooled cloud is coherent.
gravity_rotation[in] Rotation-only alignment applied before the wall mask, e.g. from plumb_imu(); identity to refine from the extrinsic orientation alone.
- Returns:
Rotation-only correction to left-multiply onto the current orientation; empty when there are no usable frames, fewer than PLUMB_WALLS_MIN_WALL_POINTS pixels stand on a wall, or the solution pinned at the search boundary.