Replies: 3 comments 1 reply
-
When it comes to partial priors, we currently have one of 2 approaches:
#FIXME check if getManifold is defined otherwise fall back to getManifoldPartial, JT: I would like to standardize to getManifold
if hasmethod(getManifold, (typeof(fnc),))
Msrc = getManifold(fnc)
setPointPartial!(mani, addEntr[m], Msrc, ccwl.measurement[m][1], partialCoords, false)
else
Msrc, = getManifoldPartial(mani,partialCoords)
setPointPartial!(mani, addEntr[m], Msrc, ccwl.measurement[m][1], partialCoords)
end |
Beta Was this translation helpful? Give feedback.
0 replies
-
We can also standardize with something like: (WIP: I'll add to IIF at some stage) function samplePointPartial(M::AbstractGroupManifold,
z::Distribution,
partial::Vector{Int},
p=identity_element(M),
retraction_method::AbstractRetractionMethod=ExponentialRetraction())
dim = manifold_dimension(M)
Xc = zeros(dim)
Xc[partial] .= rand(z)
X = hat(M, p, Xc)
return retract(M, p, X, retraction_method)
end
struct ManifoldPriorPartial{M <: AbstractManifold, T <: SamplableBelief, P <: Tuple} <: AbstractPrior
M::M
Z::T
partial::P
end
DFG.getManifold(f::ManifoldPriorPartial) = f.M
function getSample(cf::CalcFactor{<:ManifoldPriorPartial})
Z = cf.factor.Z
M = getManifold(cf.factor)
partial = collect(cf.factor.partial)
return (samplePointPartial(M, Z, partial), )
end |
Beta Was this translation helpful? Give feedback.
1 reply
-
It might be nice to have the ability to add priors from any submanifold also work correctly. ie. add Translation(3) to SE(3) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
::Tuple
ofInt
s?Beta Was this translation helpful? Give feedback.
All reactions