JuliaRobotics / IncrementalInference.jl

Clique recycling non-Gaussian (multi-modal) factor graph solver; also see Caesar.jl.
MIT License
72 stars 21 forks source link

standardize special sampler using new FMd / CalcResidual #927

Closed dehann closed 3 years ago

dehann commented 3 years ago

EDITED

New FactorMetadata should simplify specialSampler a great deal, just need to do it. Idea is to consolidate to a single getSample approach.


Suggested API

IIF.getSample(cf::CalcFactor{<:PriorSphere1}, N::Int) = (reshape(rand(cf.factor.Z,N),1,N),)

Will worry about consolidating and simplifying the ::Matrix and ::Tuple-ness later -- see #1103


Example Special Sampler

Classic getSample and .specialSampler are now equivalent with additional metadata being passed through as fields in CalcFactor which is now available in all cases. Also see #784

dehann commented 3 years ago

xref #825

dehann commented 3 years ago

xref #639

dehann commented 3 years ago

IIF v0.18.0 will introduce breaking changes surrounding how factor APIs work, so lets concentrate all changes there.