Skip to content

Commit

Permalink
fix treeProductUp post #459
Browse files Browse the repository at this point in the history
  • Loading branch information
Affie committed Sep 22, 2020
1 parent 9bbb8c5 commit c766e9f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
5 changes: 2 additions & 3 deletions examples/MultiHypo2Door.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ spyCliqMat(tree, :x2)

## specialized debugging

#FIXME Maybe related to #459 `treeProductUp` "UndefVarError: getUpMsgs not defined"
#FIXME stuff = treeProductUp(fg, tree, :l0, :x0)
#FIXME plotKDE(manikde!(stuff[1], (:Euclid,)) )
stuff = treeProductUp(fg, tree, :l0, :x0)
plotKDE(manikde!(stuff[1], (:Euclid,)) )

# plotTreeProductUp(fg, tree, :x1)

Expand Down
23 changes: 12 additions & 11 deletions src/SolveTree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -606,17 +606,18 @@ function treeProductUp(fg::AbstractDFG,

# get all the incoming (upward) messages from the tree cliques
# convert incoming messages to Int indexed format (semi-legacy format)
upmsgssym = LikelihoodMessage[]
for cl in childCliqs(tree, cliq)
msgdict = getUpMsgs(cl)
dict = Dict{Symbol, TreeBelief}()
for (dsy, btd) in msgdict.belief
vari = getVariable(fg, dsy)
# manis = getSofttype(vari).manifolds
dict[dsy] = TreeBelief(btd.val, btd.bw, btd.inferdim, getSofttype(vari))
end
push!( upmsgssym, LikelihoodMessage(beliefDict=dict) )
end
# upmsgssym = LikelihoodMessage[]
# for cl in childCliqs(tree, cliq)
# msgdict = getUpMsgs(cl)
# dict = Dict{Symbol, TreeBelief}()
# for (dsy, btd) in msgdict.belief
# vari = getVariable(fg, dsy)
# # manis = getSofttype(vari).manifolds
# dict[dsy] = TreeBelief(btd.val, btd.bw, btd.inferdim, getSofttype(vari))
# end
# push!( upmsgssym, LikelihoodMessage(beliefDict=dict) )
# end
upmsgssym = getMsgsUpChildren(tree, cliq, TreeBelief)

# perform the actual computation
manis = getSofttype(getVariable(fg, sym)) |> getManifolds
Expand Down

0 comments on commit c766e9f

Please sign in to comment.