JuliaRobotics/IncrementalInference.jl

self init solverData if not available

dehann opened this issue · 0 comments

We should not need to do this everywhere, and should just be internal automation in IIF. When launching a solve and solverData is not available -- we have been using this as workaround everywhere.

for vl in ls(fg)
  v = getVariable(fg,vl)
  varType = getVariableType(v) |> IIF._variableType
  vsolveKeys = listSolveKeys(fg,vl)
  if !(:default in vsolveKeys)
      IIF.setDefaultNodeData!(v, 0, getSolverParams(fg).N, getDimension(varType); initialized=false, varType) # dodims
  end
  if !(:parametric in vsolveKeys)
      IIF.setDefaultNodeDataParametric!(v, varType, initialized=false)
  end
end