Skip to content

Commit c5b671e

Browse files
committed
towards fixing static array factor eval
1 parent 932abd9 commit c5b671e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/testMultiHypo3Door.jl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,20 @@ addFactor!(fg, [:l3], Prior(Normal(l3, lm_prior_noise)))
5252
addVariable!(fg, :x0, ContinuousScalar, N=n_samples)
5353

5454
# Make first "door" measurement
55-
addFactor!(fg, [:x0; :l0; :l1; :l2; :l3], LinearRelative(Normal(0, meas_noise)), multihypo=[1.0; (1/4 for _=1:4)...])
55+
f1 = addFactor!(fg, [:x0; :l0; :l1; :l2; :l3], LinearRelative(Normal(0, meas_noise)), multihypo=[1.0; (1/4 for _=1:4)...])
56+
57+
# make sure approxConv is as expected
58+
@test isInitialized.(fg, [:l0;:l1;:l2;:l3]) |> all
59+
X0 = approxConvBelief(fg, getLabel(f1), :x0)
60+
# smpls = sampleFactor(fg, f1.label,200)
61+
62+
# should have four equal sized peaks at landmark locations
63+
@test 0.1 < X0([l0])[1]
64+
@test 0.1 < X0([l1])[1]
65+
@test 0.1 < X0([l2])[1]
66+
@test 0.1 < X0([l3])[1]
67+
68+
5669

5770
# Add second pose
5871
addVariable!(fg, :x1, ContinuousScalar, N=n_samples)

0 commit comments

Comments
 (0)