set frame to non-estimated removes its state blocks
Is this really intended? See the code of these two finctions in FrameBase:
@joanvallve could you give your opinion here?
void FrameBase::setNonEstimated()
{
// unregister if previously estimated
if (isKeyOrAux())
removeStateBlocks(); // here we call the function below
type_ = NON_ESTIMATED;
if (getTrajectory())
{
getTrajectory()->sortFrame(shared_from_this());
getTrajectory()->updateLastFrames();
}
}
void FrameBase::removeStateBlocks()
{
for (unsigned int i = 0; i < state_block_vec_.size(); i++)
{
StateBlockPtr sbp = getStateBlock(i);
if (sbp != nullptr)
{
if (getProblem() != nullptr)
{
getProblem()->notifyStateBlock(sbp,REMOVE);
}
setStateBlock(i, nullptr); // here we completely remove the state block from FrameBase !!!
}
}
}