Skip to content

Commit 47bb6f7

Browse files
authored
Merge pull request #69 from JuliaRobotics/patch/fixingdfgfncargvid
Patch for FileDFG issue
2 parents 32b8d6e + 9c061fa commit 47bb6f7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/FileDFG/services/FileDFG.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function _unpackFactor(dfg::G, packedProps::Dict{String, Any}, iifModule)::DFGFa
8282

8383
# GUARANTEED never to bite us in the ass in the future...
8484
# ... TODO: refactor if changed: https://github.com/JuliaRobotics/IncrementalInference.jl/issues/350
85-
getData(factor).fncargvID = _variableOrderSymbols
85+
factor.data.fncargvID = deepcopy(_variableOrderSymbols)
8686

8787
# Note, once inserted, you still need to call IIF.rebuildFactorMetadata!
8888
return factor
@@ -157,5 +157,11 @@ function loadDFG(folder::String, iifModule, dfgLoadInto::G=GraphsDFG{NoSolverPar
157157
iifModule.rebuildFactorMetadata!(dfgLoadInto, factor)
158158
end
159159

160+
# PATCH - To update the fncargvID for factors, it's being cleared somewhere in rebuildFactorMetadata.
161+
# TEMPORARY
162+
# TODO: Remove
163+
map(f->getData(f).fncargvID = f._variableOrderSymbols, getFactors(dfgLoadInto))
164+
165+
160166
return dfgLoadInto
161167
end

0 commit comments

Comments
 (0)