-
Notifications
You must be signed in to change notification settings - Fork 31
Data Design for Caesar RoME IIF
Copyright 2021 NavAbility, All rights reserved.
Discussion here on which data will be supported and how, regarding performance and availability -- see reference discussions below.
VND, Small, Meta (softtype), big data
Level2 as data which cannot be unpacked by Neo4j Cypher queries. Level1 is only allowed to exist as JSONable thing when serialized. Level1 also contains derived products from some of Level2 elements to allow so-called foveation queries. Level1 also corresponds to summary data in a graph which is starved of Level2 and Level3 data. Level0 is a immutable skeleton containing even less than Level1; in contrast Level3 contains full blown bigData
elements (but doesn't have to be all the bigData elements at once).
Note reworking attempt with new tabulated approach, see original full details below.
Level0 | Level1 | Level2 | Level3 | e.g. | |||
---|---|---|---|---|---|---|---|
SkeletonDFGVariable |
x |
label ,tags
|
|||||
summaryData | DFGVariableSummary |
x | |||||
solverData |
Dict |
Var.NodeData{T} |
x | x | :default=>Var.ND(..), :parallel_1=>... |
||
softtypename |
TBD | String |
x | MIGHT BE FIXED BY DFG 184 | |||
estimateDict |
Dict |
<:Abst.PPEst. |
x | x | x | :default=>MeanMaxPPE(..), :parallel_1=>... |
|
bigDataKeys |
Dict |
Vector{String} or set |
x | x | x | ['Data1', 'Data2'] |
|
smallData |
Dict |
String |
x | x | |||
bigData |
Dict |
<: B.D.Element |
x | ||||
... |
Julia Type | Graph DB | L0 | L1 | L2 | L3 | e.g. | |||
---|---|---|---|---|---|---|---|---|---|
DFG | SkeletonDFGVariable | Struct | x | ||||||
DFGVariableSummary | Struct | x | |||||||
DFGVariable | Struct | x | |||||||
label | Symbol | Label (Indexed Property?) | x | x | x | x0,x1,l1 | |||
tags | Vector{Symbol} | Labels | x | x | x | VARIABLE, LANDMARK, POSE | |||
timestamp | DateTime | Indexed Property | x | x | Epoch timestamp | ||||
estimateDict | Dict{Symbol, <: Abst.PPEst.} | Satellite Node | x | x | :default=>MeanMaxPPE(..), :parallel_1=>... | ||||
softtypename | String | Indexed? | x | Pose2, Point3 | |||||
solverDataDict | Dict{Symbol, Var.NodeData{T<:Softtype}} | JSON BLOB | x | :default=>Var.ND(..), :parallel_1=>... | |||||
smallDataKeys? | Vector{Symbol} or Set{Symbol} | [String]? | ? | ['Data1', 'Data2'] | |||||
- smallData | Dict{String, String} | JSON BLOB | x | "DataKey"=>"DataValue" | |||||
bigDataKeys | Vector{Symbol} or Set{Symbol} | [String]? | x | ['Data1', 'Data2'] | |||||
- bigData | Dict{Symbol, AbstractBigDataEntry} | JSON BLOB | x | key=>FileBigDataEntry(key, "FileName") | |||||
- - bigData Payload | - | - | x | Data Blob | |||||
ready | Int | Int | x | ||||||
backendset | Int | Int | x | ||||||
BigData DB | x |
- Label
- Tags
Should be quickly searchable over thousands of nodes, possibly returned in summary
- Parametric Point Estimate (PPE) are convenience byproducts of data full marginal estimation:
- Only needed to make sense of
max/mean/modefit/...
data -eg.max = [2,4,0.1]
- softype describes format,
:Pose2
means[x,y,theta]
-
Also please define the fields somehow (maybe in documentation), for example :max will be there and the name won't change to something else eg. :maximum
DFG #158. [If 'MAP_est is just the numbers]
- Only needed to make sense of
- Time - Timestamp of the pose [UTC Epoch] (see Caesar.jl#269)
- get all poses between time = [t1,t2]
- Label [x1,x2,l1,etc.] (see Caesar.jl#251)
- get x1
- get x35 to x63
- get all poses that saw landmark l1
- The 'tags' [RobotId, SessionId, Variable, Factor, Landmark, Pose, ...]
- get all Landmarks
- get all for session_xyz
- maybe if it is not important enough to want it searchable it should not be a tag
- 🔴
softtype
name as::Symbol
, -
Position, Orientation [MAP_est? Also other related such as Velocity etc.]get all poses close to coordinate [5, 3]
- Naturally, all combinations of the above, eg. all the Poses close to time=t1 that 'saw' landmark l1.
Still in graph, quickly accessible for use in calculations. Is this copied to the local (In Mememory) graphs for calculations as part of CSM.
-
VariableNodeData
- Stores all values associated with inference
-
softtype
and its meta data- Passed to user residual function for specialized computations there.
-
smalldata
- Micro second timestamp, sensor timestamp used in calculations.
🔴 Working so far: https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/pull/131/files
Big Data, all data not stored in the graph itself. Various MIME or basic types (see Caesar.jl#274)
- Image
- Depth Image
- Point Clouds
- etc.
This looks like this in the code: https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/blob/master/src/entities/DFGVariable.jl#L83-L96
Note the first-class citizens, and the abstraction of the solver data.
Currently undecided, and originally raised here (IncrementalInference.jl#143)
Note that for CloudGraphs DFG instances, we are going to make (userId, robotId, sessionId) required for a connection. So, user's will have to provide DB connection + scope of the instance (user, robot, session). This is needed to make sure the solver queries are efficient.
This will make multisession queries a special case, which must be addressed. Effectively, that means that we may need to make the functions more generic, but it won't change the data or affect efficiency, which is the current concern.
E.g. of creating a CloudGraphs-based connection and working in the graph:
# Create connection
cgDFG = CloudGraphsDFG("localhost", 7474, "neo4j", "test", #DB params
"testUser", "testRobot", "testSession", # user/robot/session
IncrementalInference.encodePackedType, # encoding/decoding
IncrementalInference.getpackedtype,
IncrementalInference.decodePackedType)
# Now can find :x0
exists(cgDFG, :x0)
# Or add a node
using RoME
addVariable!(cgDFG, :x0, Pose2)
See DistributedFactorGraphs.jl DFGVariable.jl
- 🔴 new field ('redlines')
- RoME.jl issue 61, factor residual functions should have access to variable node type metadata:
- RoME.jl issue 62, variable nodes should allow easy metadata storage:
- DFG issue 147, PPE design discussion
- https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/issues/134#issuecomment-539378906
- https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/issues/182#issuecomment-545983999 (and next comment too)
- type stability discussion