Issue Summary
History:
variableTypesofttype was added to DFGVariable DataLevel2 to solve two problems, then DFGVariableSummary (DataLevel1) came along and is exposing two competing needs which are being wrestled out as softtypename.
Requirements
- ("Manifest" aspect) information like which Manifolds, variable dimension, or Visualization projection functions to use.
- (Stateful aspect) When a user suddenly has some funky situation that requires additional variable information that must be available during deep-inner-computation-loop computations.
- Related, see
FactorMetadata that exposes the softtype and other information to the solver.
- Possible alternative,
Smalldata is an ongoing discussion for which the design is still in flux, and might induce serious performance problems owing to risk of user adding Unstable Types into the deep-inner-computation-loops.
- Prior example is
DynPose2 need to store microsecond time to allow velocity calculation, which was only added as full timestamp much later -- however, the situation can repeat with some other user data that cannot be designed in advance.
Related Issues
Plan of Action
Can split these into more issues once a design decision is made.
Original Question
We need to fix all softtypes to have a default constructors, and take out all state information.
Types with issues:
struct ContinuousMultivariate{T1 <: Tuple} <: InferenceVariable
dims::Int
manifolds::T1
ContinuousMultivariate{T}() where {T} = new()
ContinuousMultivariate{T}(x::Int; manifolds::T=(:Euclid,)) where {T <: Tuple} = new(x, manifolds)
end
mutable struct DynPose2 <: IncrementalInference.InferenceVariable
ut::Int64 # microsecond time
dims::Int
manifolds::Tuple{Symbol,Symbol,Symbol,Symbol,Symbol}
DynPose2(;ut::Int64=-9999999999) = new(ut, 5, (:Euclid,:Euclid,:Circular,:Euclid,:Euclid))
end
struct ContinuousScalar <: InferenceVariable
dims::Int
manifolds::Tuple{Symbol}
ContinuousScalar(;manifolds::Tuple{Symbol}=(:Euclid,)) = new(1, manifolds)
end
DF EDIT, a related issue is how to make it easy for the user to add their own data types to the default factors. Softtype with state solved that problem, but making it a manifest or hardtype removes that option.
SC: I suggest we add smallData to factors.
Issue Summary
History:
variableTypewas added to DFGVariable DataLevel2 to solve two problems, then DFGVariableSummary (DataLevel1) came along and is exposing two competing needs which are being wrestled out assofttypesofttypename.Requirements
FactorMetadatathat exposes the softtype and other information to the solver.Smalldatais an ongoing discussion for which the design is still in flux, and might induce serious performance problems owing to risk of user adding Unstable Types into the deep-inner-computation-loops.DynPose2need to store microsecond time to allow velocity calculation, which was only added as full timestamp much later -- however, the situation can repeat with some other user data that cannot be designed in advance.Related Issues
softtypename: wassoftypename::Symbola bad idea? DistributedFactorGraphs.jl#237Plan of Action
Can split these into more issues once a design decision is made.
softtype::Tshould have stateful information or where to offload that requirement?use "inheritance"/"interface"/"traits" from a singleton type like Pose2 that you "inherit" and add own data togetSofttypeshould work.FactorMetadatasofttypeto onlyVariableTypesee Deprecation, rename softtype -> VariableType DistributedFactorGraphs.jl#603Original Question
We need to fix all softtypes to have a default constructors, and take out all state information.
Types with issues:
DF EDIT, a related issue is how to make it easy for the user to add their own data types to the default factors. Softtype with state solved that problem, but making it a manifest or hardtype removes that option.
SC: I suggest we add smallData to factors.