Skip to main content

GicpRegistration

Struct GicpRegistration 

Source
pub struct GicpRegistration { /* private fields */ }
Expand description

Generalized ICP registration.

Implementations§

Source§

impl GicpRegistration

Source

pub const fn new(config: GicpConfig) -> GicpRegistration

Creates a GICP algorithm from config.

Source

pub const fn config(&self) -> GicpConfig

Returns the config.

Source

pub fn align_with_diagnostics( &self, source: &PointCloud, target: &PointCloud, ) -> Result<RegistrationResult, SpatialError>

Aligns source to target using Generalized ICP.

Source

pub fn align_with_gpu_correspondences( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, ) -> Result<GpuGicpDiagnostics, SpatialError>

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.

Source§

impl GicpRegistration

Source

pub fn align_with_gpu_reduction( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, ) -> Result<GpuGicpReductionDiagnostics, SpatialError>

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.

Source

pub fn align_with_gpu_resident_covariances( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, ) -> Result<GpuGicpReductionDiagnostics, SpatialError>

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.

Source

pub fn align_with_gpu_resident_radius_covariances( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, neighbor_capacity: u32, ) -> Result<GpuGicpReductionDiagnostics, SpatialError>

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.

Source

pub fn align_with_gpu_resident_grid_covariances( &self, runtime: &WgpuRuntime, source: &PointCloud, target: &PointCloud, neighbor_capacity: u32, ) -> Result<GpuGicpReductionDiagnostics, SpatialError>

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.

Trait Implementations§

Source§

impl Clone for GicpRegistration

Source§

fn clone(&self) -> GicpRegistration

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for GicpRegistration

Source§

impl Debug for GicpRegistration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl PartialEq for GicpRegistration

Source§

fn eq(&self, other: &GicpRegistration) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PointCloudRegistration for GicpRegistration

Source§

fn name(&self) -> &'static str

Human-readable registration algorithm name.
Source§

fn align( &self, source: &PointCloud, target: &PointCloud, ) -> Result<RegistrationResult, SpatialError>

Aligns source to target and returns the estimated transform.
Source§

impl StructuralPartialEq for GicpRegistration

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more