Now that core:#474 is done, we can add both factors from the same ProcessorImu:
ProcessorImu::emplaceFeaturesAndFactors(CaptureBasePtr_capture_origin,CaptureMotionPtr_capture_own// Feature and factor bias -- IMU bias drift for acc and gyro//---------------------------------------------------------------// - This factor only if IMU biases are Dynamic (check sensor->isStateBlockDynamic('I'))// - feature has zero measurement size 6, with the cov of the bias drift size 6x6// - factor relates bias(last capture) and bias(origin capture)if(getSensor()->isStateBlockDynamic('I')){constauto&sb_imubias_own=_capture_own->getStateBlock('I');constauto&sb_imubias_origin=_capture_origin->getStateBlock('I');if(sb_imubias_own!=sb_imubias_origin)// make sure it's two different state blocks! -- just in case{autodt=_capture_own->getTimeStamp()-_capture_origin->getTimeStamp();autoftr_bias=FeatureBase::emplace<FeatureBase>(_capture_own,"FeatureBase",Vector6d::Zero(),// mean IMU drift is zeroimu_drift_cov_*dt);// IMU drift cov specified in continuous timeFactorBase::emplace<FactorBlockDifference>(ftr_bias,ftr_bias,sb_imubias_own,// IMU bias block at t=ownsb_imubias_origin,// IMU bias block at t=originnullptr,// frame other_capture_origin,// origin capturenullptr,// feature othernullptr,// landmark other0,// take all of first state block-1,// take all of first state block0,// take all of first second block-1,// take all of first second blockshared_from_this(),// this processorparams_->apply_loss_function);// loss function}}