Skip to content

Commit 58e34a2

Browse files
committed
Untested PriorPose3Ref
1 parent 115a342 commit 58e34a2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/factors/PartialPose3.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,25 @@ function compare(a::PriorPose3ZRP, b::PriorPose3ZRP; tol::Float64=1e-10)
5959
end
6060

6161

62+
"""
63+
$(TYPEDEF)
64+
65+
Prior for vector measurements on Pose3.
66+
"""
67+
Base.@kwdef struct PriorPose3Ref{T<:SamplableBelief} <: IncrementalInference.AbstractPrior
68+
Z::T
69+
ref::SVector{3, Float64}
70+
end
71+
72+
getManifold(::PriorPose3Ref) = TranslationGroup(3)
73+
74+
function (cf::CalcFactor{<:PriorPose3Ref})(p_m, p)
75+
n_r = cf.factor.ref
76+
nRp = p.x[2]
77+
n_m = nRp * p_m
78+
return n_r - n_m
79+
end
80+
6281

6382
##==============================================================================
6483
## Partial Pose3 Pose3 Factors

0 commit comments

Comments
 (0)