Skip to content
Snippets Groups Projects

Resolve "Copying measurement and sqrtinfo in FactorBase (multi-threading)"

1 file
+ 3
4
Compare changes
  • Side-by-side
  • Inline
@@ -252,14 +252,13 @@ void FactorBase::link(FeatureBasePtr _ftr_ptr)
return;
}
// copy measurement_ and measurement_sqrt_information_upper_
measurement_ = _ftr_ptr->getMeasurement();
measurement_sqrt_information_upper_ = _ftr_ptr->getMeasurementSquareRootInformationUpper();
// link with feature
_ftr_ptr->addFactor(shared_from_this());
this->setFeature(_ftr_ptr);
// update measurement and info according to the feature
updateMeasurementAndSquareRootInformationUpper();
// if frame, should be key
if (getCapture() and getFrame())
assert(getFrame()->isKey() && "Forbidden: linking a factor with a non-key frame.");
Loading