diff --git a/include/core/factor/factor_relative_pose_2d_with_extrinsics.h b/include/core/factor/factor_relative_pose_2d_with_extrinsics.h index 61962bb3cdd1b29b76e48999868c76d85392a002..b0eea0f2b8f91f00a9a2bc8a7bda6ce1be66dc45 100644 --- a/include/core/factor/factor_relative_pose_2d_with_extrinsics.h +++ b/include/core/factor/factor_relative_pose_2d_with_extrinsics.h @@ -19,8 +19,8 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // //--------LICENSE_END-------- -#ifndef FACTOR_RELATIVE_POSE_2D_WITH_EXTRINSICS_THETA_H_ -#define FACTOR_RELATIVE_POSE_2D_WITH_EXTRINSICS_THETA_H_ +#ifndef FACTOR_RELATIVE_POSE_2D_WITH_EXTRINSICS_H_ +#define FACTOR_RELATIVE_POSE_2D_WITH_EXTRINSICS_H_ //Wolf includes #include "core/factor/factor_autodiff.h" @@ -67,7 +67,7 @@ class FactorRelativePose2dWithExtrinsics : public FactorAutodiff<FactorRelativeP T* _residuals) const; }; -FactorRelativePose2dWithExtrinsics::FactorRelativePose2dWithExtrinsics(const FeatureBasePtr& _ftr_ptr, +inline FactorRelativePose2dWithExtrinsics::FactorRelativePose2dWithExtrinsics(const FeatureBasePtr& _ftr_ptr, const FrameBasePtr& _frame_other_ptr, const ProcessorBasePtr& _processor_ptr, bool _apply_loss_function, @@ -92,7 +92,7 @@ FactorRelativePose2dWithExtrinsics::FactorRelativePose2dWithExtrinsics(const Fea // } -FactorRelativePose2dWithExtrinsics::FactorRelativePose2dWithExtrinsics(const FeatureBasePtr& _ftr_ptr, +inline FactorRelativePose2dWithExtrinsics::FactorRelativePose2dWithExtrinsics(const FeatureBasePtr& _ftr_ptr, const LandmarkBasePtr& _lmk_other_ptr, const ProcessorBasePtr& _processor_ptr, bool _apply_loss_function, diff --git a/include/core/factor/factor_relative_pose_3d_with_extrinsics.h b/include/core/factor/factor_relative_pose_3d_with_extrinsics.h index be0ea47b15acd5e309dda9850f9c0981fbd593ba..19245f6bcf630f737e4a01aa78b4a11030d8264a 100644 --- a/include/core/factor/factor_relative_pose_3d_with_extrinsics.h +++ b/include/core/factor/factor_relative_pose_3d_with_extrinsics.h @@ -93,12 +93,12 @@ class FactorRelativePose3dWithExtrinsics : public FactorAutodiff<FactorRelativeP namespace wolf { -FactorRelativePose3dWithExtrinsics::FactorRelativePose3dWithExtrinsics(const FeatureBasePtr& _feature_ptr, - const FrameBasePtr& _frame_other_ptr, - const ProcessorBasePtr& _processor_ptr, - bool _apply_loss_function, - const FactorTopology& _top, - FactorStatus _status) : +inline FactorRelativePose3dWithExtrinsics::FactorRelativePose3dWithExtrinsics(const FeatureBasePtr& _feature_ptr, + const FrameBasePtr& _frame_other_ptr, + const ProcessorBasePtr& _processor_ptr, + bool _apply_loss_function, + const FactorTopology& _top, + FactorStatus _status) : FactorAutodiff("FactorRelativePose3dWithExtrinsics", _top, _feature_ptr, @@ -118,12 +118,12 @@ FactorRelativePose3dWithExtrinsics::FactorRelativePose3dWithExtrinsics(const Fea { } -FactorRelativePose3dWithExtrinsics::FactorRelativePose3dWithExtrinsics(const FeatureBasePtr& _feature_ptr, - const LandmarkBasePtr& _landmark_other_ptr, - const ProcessorBasePtr& _processor_ptr, - bool _apply_loss_function, - const FactorTopology& _top, - FactorStatus _status) : +inline FactorRelativePose3dWithExtrinsics::FactorRelativePose3dWithExtrinsics(const FeatureBasePtr& _feature_ptr, + const LandmarkBasePtr& _landmark_other_ptr, + const ProcessorBasePtr& _processor_ptr, + bool _apply_loss_function, + const FactorTopology& _top, + FactorStatus _status) : FactorAutodiff("FactorRelativePose3dWithExtrinsics", _top, _feature_ptr, @@ -143,13 +143,13 @@ FactorRelativePose3dWithExtrinsics::FactorRelativePose3dWithExtrinsics(const Fea { } -FactorRelativePose3dWithExtrinsics::~FactorRelativePose3dWithExtrinsics() +inline FactorRelativePose3dWithExtrinsics::~FactorRelativePose3dWithExtrinsics() { // } template<typename T> -bool FactorRelativePose3dWithExtrinsics::operator ()(const T* const _p_ref, +inline bool FactorRelativePose3dWithExtrinsics::operator ()(const T* const _p_ref, const T* const _o_ref, const T* const _p_target, const T* const _o_target, @@ -189,7 +189,7 @@ bool FactorRelativePose3dWithExtrinsics::operator ()(const T* const _p_ref, return true; } -Eigen::Vector6d FactorRelativePose3dWithExtrinsics::residual() const +inline Eigen::Vector6d FactorRelativePose3dWithExtrinsics::residual() const { Eigen::Vector6d res; double * p_camera, * o_camera, * p_ref, * o_ref, * p_target, * o_target; @@ -205,7 +205,7 @@ Eigen::Vector6d FactorRelativePose3dWithExtrinsics::residual() const return res; } -double FactorRelativePose3dWithExtrinsics::cost() const +inline double FactorRelativePose3dWithExtrinsics::cost() const { return residual().squaredNorm(); }