Skip to content
Snippets Groups Projects
Commit a10e6922 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Remove commented Ftr and Fac emplacers

parent af4d140a
No related branches found
No related tags found
2 merge requests!466devel->main,!459Resolve "Allow ProcessorMotion to produce more than one Feature and Factor"
Pipeline #12760 failed
This commit is part of merge request !459. Comments created here will be created in the context of that merge request.
...@@ -37,6 +37,7 @@ struct ParamsProcessorBase; ...@@ -37,6 +37,7 @@ struct ParamsProcessorBase;
// wolf // wolf
#include "core/common/factory.h" #include "core/common/factory.h"
#include "core/utils/params_server.h"
// std // std
......
...@@ -79,8 +79,6 @@ class ProcessorDiffDrive : public ProcessorOdom2d ...@@ -79,8 +79,6 @@ class ProcessorDiffDrive : public ProcessorOdom2d
const VectorXd& _calib, const VectorXd& _calib,
const VectorXd& _calib_preint, const VectorXd& _calib_preint,
const CaptureBasePtr& _capture_origin) override; const CaptureBasePtr& _capture_origin) override;
// FeatureBasePtr emplaceFeature(CaptureMotionPtr _capture_own) override;
// FactorBasePtr emplaceFactor(FeatureBasePtr _feature_motion, CaptureBasePtr _capture_origin) override;
void emplaceFeaturesAndFactors(CaptureBasePtr _capture_origin, CaptureMotionPtr _capture_own) override; void emplaceFeaturesAndFactors(CaptureBasePtr _capture_origin, CaptureMotionPtr _capture_own) override;
VectorXd getCalibration(const CaptureBaseConstPtr _capture = nullptr) const override; VectorXd getCalibration(const CaptureBaseConstPtr _capture = nullptr) const override;
......
...@@ -477,16 +477,6 @@ class ProcessorMotion : public ProcessorBase, public MotionProvider ...@@ -477,16 +477,6 @@ class ProcessorMotion : public ProcessorBase, public MotionProvider
const VectorXd& _calib_preint, const VectorXd& _calib_preint,
const CaptureBasePtr& _capture_origin_ptr) = 0; const CaptureBasePtr& _capture_origin_ptr) = 0;
// /** \brief emplace a feature corresponding to given capture and add the feature to this capture
// * \param _capture_motion: the parent capture
// */
// virtual FeatureBasePtr emplaceFeature(CaptureMotionPtr _capture_own) = 0;
// /** \brief emplace a factor and link it in the wolf tree
// * \param _feature_motion: the parent feature
// * \param _frame_origin: the frame constrained by this motion factor
// */
// virtual FactorBasePtr emplaceFactor(FeatureBasePtr _feature_motion, CaptureBasePtr _capture_origin) = 0;
/** \brief emplace the features and factors corresponding to given capture and link them to the capture /** \brief emplace the features and factors corresponding to given capture and link them to the capture
* \param _capture_own: the parent capture * \param _capture_own: the parent capture
......
...@@ -104,8 +104,6 @@ class ProcessorOdom2d : public ProcessorMotion ...@@ -104,8 +104,6 @@ class ProcessorOdom2d : public ProcessorMotion
const VectorXd& _calib, const VectorXd& _calib,
const VectorXd& _calib_preint, const VectorXd& _calib_preint,
const CaptureBasePtr& _capture_origin_ptr) override; const CaptureBasePtr& _capture_origin_ptr) override;
// FeatureBasePtr emplaceFeature(CaptureMotionPtr _capture_motion) override;
// FactorBasePtr emplaceFactor(FeatureBasePtr _feature, CaptureBasePtr _capture_origin) override;
void emplaceFeaturesAndFactors(CaptureBasePtr _capture_origin, CaptureMotionPtr _capture_own) override; void emplaceFeaturesAndFactors(CaptureBasePtr _capture_origin, CaptureMotionPtr _capture_own) override;
VectorXd getCalibration(const CaptureBaseConstPtr _capture) const override; VectorXd getCalibration(const CaptureBaseConstPtr _capture) const override;
void setCalibration(const CaptureBasePtr _capture, const VectorXd& _calibration) override; void setCalibration(const CaptureBasePtr _capture, const VectorXd& _calibration) override;
......
...@@ -125,8 +125,6 @@ class ProcessorOdom3d : public ProcessorMotion ...@@ -125,8 +125,6 @@ class ProcessorOdom3d : public ProcessorMotion
const VectorXd& _calib, const VectorXd& _calib,
const VectorXd& _calib_preint, const VectorXd& _calib_preint,
const CaptureBasePtr& _capture_origin) override; const CaptureBasePtr& _capture_origin) override;
// FeatureBasePtr emplaceFeature(CaptureMotionPtr _capture_motion) override;
// FactorBasePtr emplaceFactor(FeatureBasePtr _feature_motion, CaptureBasePtr _capture_origin) override;
void emplaceFeaturesAndFactors(CaptureBasePtr _capture_origin, CaptureMotionPtr _capture_own) override; void emplaceFeaturesAndFactors(CaptureBasePtr _capture_origin, CaptureMotionPtr _capture_own) override;
VectorXd getCalibration(const CaptureBaseConstPtr _capture) const override; VectorXd getCalibration(const CaptureBaseConstPtr _capture) const override;
......
...@@ -182,28 +182,6 @@ void ProcessorDiffDrive::emplaceFeaturesAndFactors(CaptureBasePtr _capture_origi ...@@ -182,28 +182,6 @@ void ProcessorDiffDrive::emplaceFeaturesAndFactors(CaptureBasePtr _capture_origi
params_prc_diff_drv_selfcal_->apply_loss_function); params_prc_diff_drv_selfcal_->apply_loss_function);
} }
// FeatureBasePtr ProcessorDiffDrive::emplaceFeature(CaptureMotionPtr _capture_motion)
// {
// auto key_feature_ptr = FeatureBase::emplace<FeatureDiffDrive>(_capture_motion,
// _capture_motion->getBuffer().back().delta_integr_,
// _capture_motion->getBuffer().back().delta_integr_cov_,
// _capture_motion->getCalibrationPreint(),
// _capture_motion->getBuffer().back().jacobian_calib_);
// return key_feature_ptr;
// }
// FactorBasePtr ProcessorDiffDrive::emplaceFactor(FeatureBasePtr _feature,
// CaptureBasePtr _capture_origin)
// {
// auto ftr_motion = std::static_pointer_cast<FeatureMotion>(_feature);
// auto fac_odom = FactorBase::emplace<FactorDiffDrive>(ftr_motion,
// ftr_motion,
// _capture_origin,
// shared_from_this(),
// params_prc_diff_drv_selfcal_->apply_loss_function);
// return fac_odom;
// }
} /* namespace wolf */ } /* namespace wolf */
......
...@@ -484,12 +484,6 @@ void ProcessorMotion::processCapture(CaptureBasePtr _incoming_ptr) ...@@ -484,12 +484,6 @@ void ProcessorMotion::processCapture(CaptureBasePtr _incoming_ptr)
auto keyframe = last_ptr_->getFrame(); auto keyframe = last_ptr_->getFrame();
keyframe ->link(getProblem()); keyframe ->link(getProblem());
// // create motion feature and add it to the key_capture
// auto key_feature = emplaceFeature(last_ptr_);
// // create motion factor and link it to parent feature and other frame (which is origin's frame)
// auto factor = emplaceFactor(key_feature, origin_ptr_);
// create motion feature and add it to the key_capture // create motion feature and add it to the key_capture
// create motion factor and link it to parent feature and other frame (which is origin's frame) // create motion factor and link it to parent feature and other frame (which is origin's frame)
emplaceFeaturesAndFactors(origin_ptr_, last_ptr_); emplaceFeaturesAndFactors(origin_ptr_, last_ptr_);
......
...@@ -176,30 +176,6 @@ void ProcessorOdom2d::emplaceFeaturesAndFactors(CaptureBasePtr _capture_origin, ...@@ -176,30 +176,6 @@ void ProcessorOdom2d::emplaceFeaturesAndFactors(CaptureBasePtr _capture_origin,
feature, feature, _capture_origin->getFrame(), shared_from_this(), params_->apply_loss_function, TOP_MOTION); feature, feature, _capture_origin->getFrame(), shared_from_this(), params_->apply_loss_function, TOP_MOTION);
} }
// FeatureBasePtr ProcessorOdom2d::emplaceFeature(CaptureMotionPtr _capture_motion)
// {
// Eigen::MatrixXd covariance = _capture_motion->getBuffer().back().delta_integr_cov_;
// makePosDef(covariance);
// FeatureBasePtr key_feature_ptr = FeatureBase::emplace<FeatureBase>(_capture_motion,
// "ProcessorOdom2d",
// _capture_motion->getBuffer().back().delta_integr_,
// covariance);
// return key_feature_ptr;
// }
// FactorBasePtr ProcessorOdom2d::emplaceFactor(FeatureBasePtr _feature, CaptureBasePtr _capture_origin)
// {
// auto fac_odom = FactorBase::emplace<FactorRelativePose2d>(_feature,
// _feature,
// _capture_origin->getFrame(),
// shared_from_this(),
// params_->apply_loss_function,
// TOP_MOTION);
// return fac_odom;
// }
} /* namespace wolf */ } /* namespace wolf */
......
...@@ -221,25 +221,6 @@ Eigen::VectorXd ProcessorOdom3d::correctDelta (const Eigen::VectorXd& delta_prei ...@@ -221,25 +221,6 @@ Eigen::VectorXd ProcessorOdom3d::correctDelta (const Eigen::VectorXd& delta_prei
return delta_corrected; return delta_corrected;
} }
// FeatureBasePtr ProcessorOdom3d::emplaceFeature(CaptureMotionPtr _capture_motion)
// {
// FeatureBasePtr key_feature_ptr = FeatureBase::emplace<FeatureBase>(_capture_motion,
// "ProcessorOdom3d",
// _capture_motion->getBuffer().back().delta_integr_,
// _capture_motion->getBuffer().back().delta_integr_cov_);
// return key_feature_ptr;
// }
// FactorBasePtr ProcessorOdom3d::emplaceFactor(FeatureBasePtr _feature_motion, CaptureBasePtr _capture_origin)
// {
// auto fac_odom = FactorBase::emplace<FactorRelativePose3d>(_feature_motion,
// _feature_motion,
// _capture_origin->getFrame(),
// shared_from_this(),
// params_->apply_loss_function,
// TOP_MOTION);
// return fac_odom;
// }
void ProcessorOdom3d::emplaceFeaturesAndFactors(CaptureBasePtr _capture_origin, CaptureMotionPtr _capture_own) void ProcessorOdom3d::emplaceFeaturesAndFactors(CaptureBasePtr _capture_origin, CaptureMotionPtr _capture_own)
{ {
......
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