pub struct GicpRegistration { /* private fields */ }Expand description
Generalized ICP registration.
Implementations§
Source§impl GicpRegistration
impl GicpRegistration
Sourcepub fn align_with_gpu_reduction(
&self,
runtime: &WgpuRuntime,
source: &PointCloud,
target: &PointCloud,
) -> SpatialResult<GpuGicpReductionDiagnostics>
pub fn align_with_gpu_reduction( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<GpuGicpReductionDiagnostics>
Retains source/target/covariances on GPU for transform, nearest matching, rotated covariance inverse, Hessian/gradient and Euclidean fitness passes. CPU solves normalized 6x6 equations and converts the linearized step to the existing world update/stopping convention. Each evaluation explicitly downloads 256 bytes; post-update equations feed the next solve/final fitness. Covariance preparation remains CPU k-NN or explicit radius-GPU readback and re-upload with full receipts. CPU k-NN rows are packed directly with bounded scoped workers for large native inputs; small/WASM inputs stay serial. Per-point neighbor and f64 accumulation order is preserved. No automatic CPU fallback occurs. Configuration/conditioning restrictions are stricter than legacy GICP; f32 weights, transforms and sums can change pose/matching/stopping.
Sourcepub fn align_with_gpu_resident_covariances(
&self,
runtime: &WgpuRuntime,
source: &PointCloud,
target: &PointCloud,
) -> SpatialResult<GpuGicpReductionDiagnostics>
pub fn align_with_gpu_resident_covariances( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<GpuGicpReductionDiagnostics>
Computes k-NN neighborhoods and plane covariances on GPU, retaining the covariance buffers for the existing resident equation/update loop. No neighborhood/covariance download or re-upload occurs. CPU builds both trees, solves normalized 6x6 equations and composes/stops the pose. Requires covariance_radius=None, k_neighbors=3..=64, epsilon (as f32) in 1e-4..=1, and the same valid configuration as align_with_gpu_reduction. Centered/scaled f32 covariance/eigenvectors may differ from CPU raw products, particularly at repeated eigenvalues and search boundaries. Invalid device preparation rejects equations without CPU fallback.
Sourcepub fn align_with_gpu_resident_radius_covariances(
&self,
runtime: &WgpuRuntime,
source: &PointCloud,
target: &PointCloud,
neighbor_capacity: u32,
) -> SpatialResult<GpuGicpReductionDiagnostics>
pub fn align_with_gpu_resident_radius_covariances( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, neighbor_capacity: u32, ) -> SpatialResult<GpuGicpReductionDiagnostics>
Computes complete inclusive radius neighborhoods and covariances on GPU
and retains them for the resident equation/update loop. Requires configured
covariance_radius=Some(finite positive radius) with a normal f32 square,
epsilon (as f32) in 1e-4..=1 and positive neighbor_capacity per point.
Capacity includes self/duplicates; overflow fails without truncation or
fallback. Fewer than three neighbors use epsilonI as in the grid route.
Centered/scaled compensated f32 covariance and max-pivot Jacobi can differ
from grid accumulation/sweeps, especially at repeated eigenvalues/gates.
CPU builds both trees, solves 6x6 equations and composes/stops the pose.
Upload is 32(S+T+source_nodes+target_nodes) bytes; downloads are only
256 bytes per evaluation. No neighborhood/covariance payload crosses CPU.
Sourcepub fn align_with_gpu_resident_grid_covariances(
&self,
runtime: &WgpuRuntime,
source: &PointCloud,
target: &PointCloud,
neighbor_capacity: u32,
) -> SpatialResult<GpuGicpReductionDiagnostics>
pub fn align_with_gpu_resident_grid_covariances( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, neighbor_capacity: u32, ) -> SpatialResult<GpuGicpReductionDiagnostics>
Prepares radius covariances with CPU counting-sort grids and GPU gather, retaining the canonical grid’s raw f32 means/central sums/Jacobi sweeps. No source KD-tree, per-point neighborhood buffer or covariance readback is needed. Positive capacity includes self/duplicates; overflow rejects all equations. Configured radius/epsilon and normal-equation constraints match the resident-radius API. Dense grids must fit existing cell/device limits; no automatic sparse-path/CPU fallback occurs. CPU prepares grids and the target tree and solves 6x6 equations. Downloads remain 256 bytes per evaluation; all grid-index uploads are included in the receipt.
Source§impl GicpRegistration
impl GicpRegistration
Sourcepub const fn new(config: GicpConfig) -> Self
pub const fn new(config: GicpConfig) -> Self
Creates a GICP algorithm from config.
Sourcepub const fn config(&self) -> GicpConfig
pub const fn config(&self) -> GicpConfig
Returns the config.
Sourcepub fn align_with_diagnostics(
&self,
source: &PointCloud,
target: &PointCloud,
) -> SpatialResult<RegistrationResult>
pub fn align_with_diagnostics( &self, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<RegistrationResult>
Aligns source to target using Generalized ICP.
Sourcepub fn align_with_gpu_correspondences(
&self,
runtime: &WgpuRuntime,
source: &PointCloud,
target: &PointCloud,
) -> SpatialResult<GpuGicpDiagnostics>
pub fn align_with_gpu_correspondences( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<GpuGicpDiagnostics>
Aligns with explicit GPU correspondence uploads/readbacks and a reused target. Covariance estimation uses CPU k-NN when covariance_radius is None, or explicit radius-GPU execution on this runtime when configured. Hessian/gradient reduction, pose solving, transforms and fitness sums remain CPU. All GPU errors propagate without the legacy CPU fallback. This explicit path requires finite input/transformed XYZ.
Trait Implementations§
Source§impl Clone for GicpRegistration
impl Clone for GicpRegistration
Source§fn clone(&self) -> GicpRegistration
fn clone(&self) -> GicpRegistration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GicpRegistration
Source§impl Debug for GicpRegistration
impl Debug for GicpRegistration
Source§impl PartialEq for GicpRegistration
impl PartialEq for GicpRegistration
Source§impl PointCloudRegistration for GicpRegistration
impl PointCloudRegistration for GicpRegistration
Source§fn align(
&self,
source: &PointCloud,
target: &PointCloud,
) -> SpatialResult<RegistrationResult>
fn align( &self, source: &PointCloud, target: &PointCloud, ) -> SpatialResult<RegistrationResult>
source to target and returns the estimated transform.