Skip to content

Commit bc8e397

Browse files
authored
Merge pull request #1618 from JuliaRobotics/22Q3/backport/fix_entropy
rc v0.30.7 Backport entropy fix
2 parents 40bae09 + 633fc39 commit bc8e397

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "IncrementalInference"
22
uuid = "904591bb-b899-562f-9e6f-b8df64c7d480"
33
keywords = ["MM-iSAMv2", "Bayes tree", "junction tree", "Bayes network", "variable elimination", "graphical models", "SLAM", "inference", "sum-product", "belief-propagation"]
44
desc = "Implements the Multimodal-iSAMv2 algorithm."
5-
version = "0.30.6"
5+
version = "0.30.7"
66

77
[deps]
88
ApproxManifoldProducts = "9bbbb610-88a1-53cd-9763-118ce10c1f89"

src/services/EvalFactor.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,13 @@ function computeAcrossHypothesis!(ccwl::Union{<:CommonConvWrapper{F},
182182
for i in 1:Threads.nthreads() ccwl.cpt[i].activehypo = vars; end
183183

184184
addEntr = view(ccwl.params[sfidx], allelements[count])
185-
# dynamic estimate with user requested speadNH of how much noise to inject (inflation or nullhypo)
186-
spreadDist = calcVariableDistanceExpectedFractional(ccwl, sfidx, certainidx, kappa=ccwl.inflation)
187185

188186
# do proposal inflation step, see #1051
189187
# consider duplicate convolution approximations for inflation off-zero
190188
# ultimately set by dfg.params.inflateCycles
191189
for iflc in 1:inflateCycles
190+
# dynamic estimate with user requested speadNH of how much noise to inject (inflation or nullhypo)
191+
spreadDist = calcVariableDistanceExpectedFractional(ccwl, sfidx, certainidx, kappa=ccwl.inflation)
192192
addEntropyOnManifold!(mani, addEntr, 1:getDimension(mani), spreadDist, ccwl.partialDims)
193193
# no calculate new proposal belief on kernels `allelements[count]`
194194
_checkErrorCCWNumerics(ccwl, testshuffle)

test/testEuclidDistance.jl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,33 @@ end
136136
# at least one of the 3 solves should produce the right result
137137

138138

139+
##
140+
#test one clique as in RoME
141+
N=100
142+
points = [[100.0;0.0],[0.0;100.0]]
143+
fg = IIF.generateGraph_EuclidDistance(points)
144+
fg.solverParams.graphinit = false
145+
146+
M = getManifold(fg, :l1)
147+
TP = false
148+
for i in 1:3
149+
# global TP, N
150+
tree = solveTree!(fg);
151+
152+
L1 = getBelief(fg, :l1) |> getPoints
153+
154+
# check that two modes exist
155+
am1 = sum(isapprox.(Ref(M), L1, Ref([0.0,0.0]), atol=10))
156+
am2 = sum(isapprox.(Ref(M), L1, Ref([100.0,100.0]), atol=10))
157+
158+
TP = am1 > N*0.03
159+
TP &= am2 > N*0.03
160+
if TP
161+
@info "test passed in $i"
162+
break
163+
end
164+
end
165+
@test TP
139166
##
140167

141168
end

0 commit comments

Comments
 (0)