Replies: 5 comments 14 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
addState(::Var, ::State) # SDK will not know the route to this data so unusable in SDK but still works in DFG
addState(::FactorGraph, ::Symbol, ::State) # this allows full data route to be resolved at an SDK level the first function should only be available to Julia DFG powerusers and should be marked as
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a private issue comment moved here to make the discussion easier.
(@dehann:) From yet another phone call, the following points suddenly stood out from the long discussion today and think we are at parity on "cross-over" between DFG and SDK -- we should discuss to ensure the following notes resonate.
Key notes from today's call:
public
stable functions that power users can use for more performant code (e.g. make better use of Julia's dispatch which is not available in other languages).using DFG: BlaBla
and reexport (bit of a hack but seems okay before IIF v1 -- we can review then).merge(::DFG, ::Symbol, ::State)
may be good enough for Julia, but not python. So Julia should have the aliasmergeState
so that Python can also havemergeState
). CAVEAT, it is hard to know these signatures before DFG v1.0 is released so there is a workaround, which is to instead implement the verbosemergeState
in DFG, and alias the reductionmerge
. All indications are that this does not block DFG v1.X from moving the implementation to the shortest signature.name and aliasing the more verbose, hence either-or works for DFG v1.0. Just keep moving.the first function should only be available to Julia DFG powerusers and should be marked as
public
when stable, but not exported from DFG. The second function should be the first introduction for new users, so that transition from DIY DFG leads to smoother transition when SDK cost savings become relevant to a new NavAbility customer.merge
verb). In example above, there is no way to markaddState
as both public and export. So in-memory accessors for DFG should use thevariable.state
notation rather thangetState(:Variable) / getVariableState(variable::Variable)
. There are cases where dispatch is required, such asvariable.state
but variable might be a Datalevel 3 (VariableDFG) object. The permissible solution is to overload the Juliagetfield
method to intercept the call and resolve necessary unpacking (i.e. dispatch) there.getStateDict
, how does that go with verbget
returning different objects etc. Can resolve that individually. Overall "cross-over" concept is now better captured here.Originally posted in various issues in
pack
/unpack
for variable/factor serialization (fromconvert
) JuliaRobotics/DistributedFactorGraphs.jl#1082Also see:
Beta Was this translation helpful? Give feedback.
All reactions