Allow ProcessorMotion to produce more than one Feature and Factor
Now PM proceeds like this:
if (new KF) // this condition appears several times in the algorithm of PM.
{
auto feature = emplaceFeature(cap_current); // This is pure virtual in PM
auto factor = emplaceFactor(feature, cap_origin); // This is pure virtual in PM
}
so only allowing one type of factor.
If a ProcessorMotionDerived
wants to add more than one, we need to tweak the two emplace
above, and it's not nice.
Examples of PMDerived that might want to do so are:
-
ProcessorImu
: to create a IMU factor and two Bias drift factors. -
ProcessorForceTorqueInertial
: to create a FTI factor, two bias drift factors, and an Angular momentum factor.
The proposal is to substitute the pure virtuals by a single function:
void ProcessorMotion::emplaceFeaturesAndFactors(cap_current, cap_origin) = 0;
so that the piece of algo above becomes
if (new KF) // this condition appears several times in the algorithm of PM.
emplaceFeaturesAndFactors(cap_current, cap_origin)
EDIT -- click the classes below as they are updated to the new design:
- ProcessorMotion - core
- ProcessorDiffDrive - core
- ProcessorOdom2d - core
- ProcessorOdom3d - core
- ProcessorImu - imu
- ProcessorImu2d - imu
- ProcessorForceTorque - bodydynamics
- ProcessorForceTorqueInertial - bodydynamics
- ProcessorForceTorqueInertialDynamic - bodydynamics