diff --git a/src/processor/processor_imu2d.cpp b/src/processor/processor_imu2d.cpp index bef7024e841dac97990966396236ad184e3bb603..52633147eeebf61970a0963aa1b43b115ad811c0 100644 --- a/src/processor/processor_imu2d.cpp +++ b/src/processor/processor_imu2d.cpp @@ -89,9 +89,10 @@ namespace wolf { VectorXd ProcessorImu2d::getCalibration (const CaptureBasePtr _capture) const { - assert(_capture && "called with a null capture"); - assert(_capture->getSensorIntrinsic() && "null sensor intrinsics state block"); - return _capture->getSensorIntrinsic()->getState(); + if (_capture) + return _capture->getStateBlock('I')->getState(); + else + return getSensor()->getStateBlockDynamic('I')->getState(); } void ProcessorImu2d::setCalibration (const CaptureBasePtr _capture, const VectorXd& _calibration)