Implement processor bootstrapping
This bootstrap is required for IMU processor, but some code needs to be inserted in core for it to work.
Please read the bootstrap details on the IMU plugin issue 29: mobile_robotics/wolf_projects/wolf_lib/plugins/imu#29 (closed)
For what concerns the core plugin, here are the necessary changes. They concern ProcessorMotion
, Problem
, all nodes
having state blocks, and StateBlock
:
-
ProcessorMotion
:-
Add a member bool ProcessorMotion::bootstrapping
to control the following:-
factors added are declared inactive --> probably in Derived::emplaceFactors()
-
bootstrap()
is called
-
-
Add virtual void ProcessorMotion::bootstrap()
method (virtual or pure virtual, TBD)- wait for the conditions to apply the bootstrap
- compute the necessary elements
- transform all the nodes in Problem with the new bootsrapped solution
- re-activate all factors that were declared
inactive
- clear the
bootstrapping
flag
-
-
Problem
:-
Add void Problem::transformAll(VectorComposite("PO"))
to transform all wolf tree after bootstrapping
-
-
Nodes
(maybe inHasStateBlocks
):-
Add void AllNodes::transform(VectorComposite("PO"))
to transform all node's state blocks
-
-
StateBlock
:-
Add void StateBlock::transform(VectorComposite("PO")) = 0
to transform the state block -
Add bool StateBlock::transformable
to control if transformation should be applied -
Derive all state blocks to specific types. -
Implement transform
in all derived state blocks
-
Edited by Joan Solà Ortega