Frame creation policy
We need to adress the issue of creating frames in a neat way.
Now, we have a FrameStructure
enum, which is stored in Trajectory
.
At frame creation, we do a switch(frame_structure)
, and then go into deciding which kind of frame to construct.
This is not desirable.
I wrote a Frame
factory (checkout factory
branch, then see the bottom of factory.h
, and also the bottom of FrameBase.cpp
and FrameIMU.cpp
)
It is still unclear to me how to proceed properly. Frame
creation happens at least in:
Problem.createFrame()
The switch statement, and related hard-coded decisions happen at least in:
Problem.createFrame()
Problem.getFrameStructureSize()
Problem.zeroState()
NOTE: A similar discussion exists for Constraints
. This will be another issue.