Skip to content
Snippets Groups Projects
Commit 6200c4b8 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

added asserts (strange bug in mergeCaptures)

parent 4d0a467e
No related branches found
No related tags found
No related merge requests found
...@@ -102,6 +102,11 @@ void ProcessorImu::setCalibration (const CaptureBasePtr _capture, const VectorXd ...@@ -102,6 +102,11 @@ void ProcessorImu::setCalibration (const CaptureBasePtr _capture, const VectorXd
FactorBasePtr ProcessorImu::emplaceFactor(FeatureBasePtr _feature_motion, CaptureBasePtr _capture_origin) FactorBasePtr ProcessorImu::emplaceFactor(FeatureBasePtr _feature_motion, CaptureBasePtr _capture_origin)
{ {
assert(_capture_origin != nullptr && _capture_origin->getType() == "CaptureImu" && "ProcessorImu::emplaceFactor: capture is null or not of type CaptureImu");
assert(_feature_motion != nullptr && _feature_motion->getType() == "FeatureImu" && "ProcessorImu::emplaceFactor: feature is null or not of type FeatureImu");
assert(_capture_origin->getFrame() && "ProcessorImu::emplaceFactor: capture not linked to a frame");
assert(_feature_motion->getCapture() and _feature_motion->getCapture()->getFrame() && "ProcessorImu::emplaceFactor: feature not linked to a capture or a frame");
CaptureImuPtr cap_imu = std::static_pointer_cast<CaptureImu>(_capture_origin); CaptureImuPtr cap_imu = std::static_pointer_cast<CaptureImu>(_capture_origin);
FeatureImuPtr ftr_imu = std::static_pointer_cast<FeatureImu>(_feature_motion); FeatureImuPtr ftr_imu = std::static_pointer_cast<FeatureImu>(_feature_motion);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment