Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for CGDFG during rebuildFactorMetadata #1425

Merged
merged 3 commits into from
Oct 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "IncrementalInference"
uuid = "904591bb-b899-562f-9e6f-b8df64c7d480"
keywords = ["MM-iSAMv2", "Bayes tree", "junction tree", "Bayes network", "variable elimination", "graphical models", "SLAM", "inference", "sum-product", "belief-propagation"]
desc = "Implements the Multimodal-iSAMv2 algorithm."
version = "0.25.2"
version = "0.25.3"

[deps]
ApproxManifoldProducts = "9bbbb610-88a1-53cd-9763-118ce10c1f89"
Expand Down Expand Up @@ -47,7 +47,7 @@ ApproxManifoldProducts = "0.4.16"
BSON = "0.2, 0.3"
Combinatorics = "1.0"
DataStructures = "0.16, 0.17, 0.18"
DistributedFactorGraphs = "0.16.1"
DistributedFactorGraphs = "0.16.2"
Distributions = "0.24, 0.25"
DocStringExtensions = "0.8"
FileIO = "1"
Expand Down
8 changes: 7 additions & 1 deletion src/DispatchPackedConversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ end
$(SIGNATURES)
After deserializing a factor using decodePackedType, use this to
completely rebuild the factor's CCW and user data.
Dev Notes:
- TODO: We should only really do this in-memory if we can by without it (review this).
"""
function rebuildFactorMetadata!(dfg::AbstractDFG{SolverParams},
factor::DFGFactor,
Expand Down Expand Up @@ -97,12 +99,16 @@ function rebuildFactorMetadata!(dfg::AbstractDFG{SolverParams},
#

# replace old factor in dfg with a new one
deleteFactor!(dfg, factor)
deleteFactor!(dfg, factor, suppressGetFactor=true)
addFactor!(dfg, factor__)

factor__
else
setSolverData!(factor, fnd_new)
# We're not updating here because we don't want
# to solve cloud in loop, we want to make sure this flow works:
# Pull big cloud graph into local -> solve local -> push back into cloud.
# updateFactor!(dfg, factor)
factor
end

Expand Down