|
1 |
| -dfg = CloudGraphsDFG{NoSolverParams}("localhost", 7474, "neo4j", "test", |
| 1 | +dfg = CloudGraphsDFG{SolverParams}("localhost", 7474, "neo4j", "test", |
2 | 2 | "testUser", "testRobot", "testSession",
|
3 | 3 | nothing,
|
4 | 4 | nothing,
|
5 | 5 | IncrementalInference.decodePackedType,
|
6 | 6 | IncrementalInference.rebuildFactorMetadata!,
|
7 |
| - solverParams=NoSolverParams()) |
| 7 | + solverParams=SolverParams()) |
8 | 8 |
|
9 | 9 | # Nuke the user
|
10 | 10 | clearUser!!(dfg)
|
@@ -61,37 +61,15 @@ setSessionData(dfg, session.data)
|
61 | 61 | v1 = addVariable!(dfg, :a, ContinuousScalar, labels = [:POSE])
|
62 | 62 | v2 = addVariable!(dfg, :b, ContinuousScalar, labels = [:POSE])
|
63 | 63 | v3 = addVariable!(dfg, :c, ContinuousScalar, labels = [:LANDMARK])
|
| 64 | +addFactor!(dfg, [:a], Prior(Normal(0,1))) |
64 | 65 | f1 = addFactor!(dfg, [:a; :b], LinearConditional(Normal(50.0,2.0)) )
|
65 | 66 | f2 = addFactor!(dfg, [:b; :c], LinearConditional(Normal(50.0,2.0)) )
|
66 | 67 |
|
67 | 68 | sessions = lsSessions(dfg)
|
68 | 69 | @test map(s -> s.id, sessions) == [session.id]
|
69 | 70 |
|
70 |
| -# Pull and solve this graph |
71 | 71 | dfgLocal = GraphsDFG{SolverParams}(params=SolverParams())
|
72 | 72 | DistributedFactorGraphs.getSubgraph(dfg, union(ls(dfg), lsf(dfg)), true, dfgLocal)
|
73 |
| - |
74 | 73 | # Confirm that with sentinels we still have the same graph (doesn't pull in the sentinels)
|
75 | 74 | @test symdiff(ls(dfgLocal), ls(dfg)) == []
|
76 | 75 | @test symdiff(lsf(dfgLocal), lsf(dfg)) == []
|
77 |
| - |
78 |
| -# Solve it |
79 |
| -tree, smtasks = solveTree!(dfgLocal) |
80 |
| - |
81 |
| - |
82 |
| -# Make sure we can copy and solve normal orphaned sessions. |
83 |
| -dfgOrphaned = deepcopy(dfg) |
84 |
| -dfgOrphaned.sessionId = "doesntexist" |
85 |
| -# Don't create a session |
86 |
| -# Add some nodes. |
87 |
| -v1 = addVariable!(dfgOrphaned, :a, ContinuousScalar, labels = [:POSE]) |
88 |
| -v2 = addVariable!(dfgOrphaned, :b, ContinuousScalar, labels = [:POSE]) |
89 |
| -v3 = addVariable!(dfgOrphaned, :c, ContinuousScalar, labels = [:LANDMARK]) |
90 |
| -f1 = addFactor!(dfgOrphaned, [:a; :b], LinearConditional(Normal(50.0,2.0)) ) |
91 |
| -f2 = addFactor!(dfgOrphaned, [:b; :c], LinearConditional(Normal(50.0,2.0)) ) |
92 |
| -# Solve it |
93 |
| -dfgLocal = GraphsDFG{SolverParams}(params=SolverParams()) |
94 |
| -DistributedFactorGraphs.getSubgraph(dfgOrphaned, union(ls(dfgOrphaned), lsf(dfgOrphaned)), true, dfgLocal) |
95 |
| -tree, smtasks = solveTree!(dfgLocal) |
96 |
| - |
97 |
| -# If this passes without errors and we solve the graph, then all good. |
0 commit comments