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

Merge branch 'remove-shptr-reference' into 'devel'

Replace sh_ptr reference by simple sh_ptr

See merge request !7
parents 3701aeae 822edbc3
No related branches found
No related tags found
1 merge request!7Replace sh_ptr reference by simple sh_ptr
......@@ -92,7 +92,7 @@ class ProcessorGnssFix : public ProcessorBase
virtual bool voteForKeyFrame() override;
private:
FactorBasePtr emplaceFactor(FeatureBasePtr& ftr_ptr);
FactorBasePtr emplaceFactor(FeatureBasePtr _ftr_ptr);
bool rejectOutlier(FactorBasePtr ctr_ptr);
public:
......
......@@ -94,7 +94,7 @@ class ProcessorGnssSingleDiff : public ProcessorBase
private:
FactorBasePtr emplaceFactor(FeatureBasePtr& ftr);
FactorBasePtr emplaceFactor(FeatureBasePtr _ftr);
public:
static ProcessorBasePtr create(const std::string& _unique_name, const ProcessorParamsBasePtr _params, const SensorBasePtr sensor);
......
......@@ -98,16 +98,16 @@ void ProcessorGnssFix::processCapture(CaptureBasePtr _capture)
}
}
FactorBasePtr ProcessorGnssFix::emplaceFactor(FeatureBasePtr& ftr)
FactorBasePtr ProcessorGnssFix::emplaceFactor(FeatureBasePtr _ftr)
{
// CREATE CONSTRAINT --------------------
//WOLF_DEBUG("creating the factor...");
// 2D
if (getProblem()->getDim() == 2)
return FactorBase::emplace<FactorGnssFix2D>(ftr, ftr, sensor_gnss_, shared_from_this(), false, FAC_ACTIVE);
return FactorBase::emplace<FactorGnssFix2D>(_ftr, _ftr, sensor_gnss_, shared_from_this(), false, FAC_ACTIVE);
// 3D
else
return FactorBase::emplace<FactorGnssFix3D>(ftr, ftr, sensor_gnss_, shared_from_this(), false, FAC_ACTIVE);
return FactorBase::emplace<FactorGnssFix3D>(_ftr, _ftr, sensor_gnss_, shared_from_this(), false, FAC_ACTIVE);
}
bool ProcessorGnssFix::rejectOutlier(FactorBasePtr fac)
......
......@@ -88,12 +88,12 @@ void ProcessorGnssSingleDiff::processCapture(CaptureBasePtr _capture)
}
}
FactorBasePtr ProcessorGnssSingleDiff::emplaceFactor(FeatureBasePtr& ftr)
FactorBasePtr ProcessorGnssSingleDiff::emplaceFactor(FeatureBasePtr _ftr)
{
//WOLF_DEBUG("creating the factor...");
// 2D
if (getProblem()->getDim() == 2)
return FactorBase::emplace<FactorGnssSingleDiff2D>(ftr, ftr, incoming_capture_->getOriginFrame(), sensor_gnss_, shared_from_this());
return FactorBase::emplace<FactorGnssSingleDiff2D>(_ftr, _ftr, incoming_capture_->getOriginFrame(), sensor_gnss_, shared_from_this());
// 3D TODO
else
std::runtime_error("Single Differences in 3D not implemented yet.");
......
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