Skip to content

Commit b5e6750

Browse files
authored
Merge pull request #1349 from JuliaRobotics/21Q3/fix/getmeasparam_ascoord
fix solveFactorParametric as coordinates only
2 parents 5de4ee9 + 3adb70b commit b5e6750

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/TetherUtils.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ Notes
111111
- Not used during tree inference.
112112
- Expected uses are for user analysis of factors and estimates.
113113
- real-time dead reckoning chain prediction.
114+
- Returns mean value as coordinates
114115
115116
DevNotes
116117
- # TODO consolidate with similar `approxConv`

src/services/ApproxConv.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,13 @@ function solveFactorParameteric(dfg::AbstractDFG,
276276

277277
# get the measurement point
278278
fctTyp = getFactorType(fct)
279+
# this is definitely in coordinates, see JuliaRobotics/RoME.jl#465
279280
mea, _ = getMeasurementParametric(fctTyp)
280-
# should this be coords, tangent, or point
281-
measT = (mea,)
281+
# must change measT to be a tangent vector
282+
M = getManifold(fctTyp)
283+
e0 = identity_element(M)
284+
mea_ = hat(M, e0, mea)
285+
measT = (mea_,)
282286

283287
# get variable points
284288
function _getParametric(vari::DFGVariable, key=:default)

test/testDeadReckoningTether.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ MutableLinearRelative(nm::MvNormal) = MutableLinearRelative{length(nm.μ), typeo
2121
MutableLinearRelative(nm::ManifoldKernelDensity) = MutableLinearRelative{Ndim(nm), typeof(nm)}(nm)
2222

2323
getDimension(::Type{MutableLinearRelative{N,<:SamplableBelief}}) where {N} = N
24-
# getManifolds(::Type{MutableLinearRelative{N,<:SamplableBelief}}) where {N} = tuple([:Euclid for i in 1:N]...)
24+
getManifold(::MutableLinearRelative{N}) where N = TranslationGroup(N)
2525

2626

2727
function IIF.getSample(cf::CalcFactor{<:MutableLinearRelative}, N::Int=1)

0 commit comments

Comments
 (0)