Open dehann opened 5 years ago
affects
Hi @tonioteran , cc'ing in case you were interested in the work on how we solve the autoinit problem on the tree. I'm busy implementing this new fix as improvement over slightly hacky previous version. Variable initialization can be tricky...
implementation is getting a bit nasty, but getting to the final debugging stages now: https://github.com/JuliaRobotics/IncrementalInference.jl/blob/abb857f8e7098d5af9bc6e666fcf899b75f55304/src/CliqStateMachineUtils.jl#L316
was introduced in v0.7.3 but need more -- the inferdim
dim work #353
xref #910 and #754
Parent clique:
x34, x9, x54, x26, x46, x14, x4
with 5 children:x38 | x34, x4, x26, x54, x46, x14
x30 | x26, x34
x50 | x46, x54
x12 | x14, x9
x6 | x4, x9
Based on lower down information (priors) only
x38
can initialize from below. All 4 other sibling cliques must cross initialize through the parent -- i.e. downward init.By checking the number of intersections of separators between the siblings we find as follows:
x38
-->x30 => 2
,x50 => 2
,x12 => 1
,x6 => 1
as a triangular matrix:
Summing triangular matrix along columns gives (AA):
Summing symmetric version of matrix along columns gives (BB):
By summing the triangular matrix along rows we find (CC):
This (CC) implies special significance on cliques
x38
andx12
, whilex30
andx50
are more 'independent'. Next we look at the best achievable status of each of the sibling cliques and find:x38
, upsolvedx30
, needdownx50
, needdownx12
, needdownx6
, needdownTherefore
x38
will be used for upward information that can be distributed to the siblings and that clique can therefore pass and CSM may proceed to the next stage ofx38
's solution.The special case of clique
x12
must now be considered. By eliminatingx38
as upsolved the triangular matrix reduces to:Summing along the triangular columns reveal (DD):
This also Indicates a special interaction between cliques
x12
andx6
(row 4, column 5 is non-zero). Knowning that both:needdownmsg
information, we must first determine what the interaction between these two cliques should be. Using CC and by looking at the opposite eliminated (x12
) triangular matrix, we find:Summing along the triangular columns reveal (EE):
x30
andx50
can readily be initialized with downward information (non-zero columns EE).x6
in (EE) is also non-zero.x6
in (DD) is also non-zero.Both cliques
x12
andx6
are equally weighted with one shared variable in their separators -- variablex9
in this case (which doesn't appear in cliquex38
's separator). This process identifies that one clique may likely have to be initialized before the other and then provide additional downward initialization information for the last remaining branch. The task now is to determine if cliquex12
orx6
should be initialized first?The triangular column sum with
x12
rows and columns eliminated shows that cliquex6
can also be initialized, after which a second piece of downward initialization information will become available for use in cliquex12
's branch.To determine okay for downinit on
x12
, we repeat the process by eliminating any further solved siblings from the triangular matrix:Recap:
x38
,x30
,x50
, andx6
,x12
must wait for two bits of down info based on (BB), from cliquesx38
andx6
,x12
is blocked because of the associated non-zero in (CC) and becausex6
(EE) is not yet solved.When
x12
returns upon downinit info availability status update via parentx34
, EE is updated with all butx12
as upsolved. This implies no further down info will be available (sincex6
has now been upsolved), andx12
can now proceed to retrieve down init messages and attempt upsolve. If the tree is correct, the upsolve should succeed.Future: