From 119ccf6cfcf4641c8b795a6512ea546c5535cddf Mon Sep 17 00:00:00 2001 From: Oscar Mendez Date: Mon, 8 Apr 2024 19:37:39 +0100 Subject: [PATCH] Fixing bug with number of residual calculation. --- fuse_constraints/src/fixed_3d_landmark_constraint.cpp | 2 +- .../src/fixed_3d_landmark_simple_covariance_constraint.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fuse_constraints/src/fixed_3d_landmark_constraint.cpp b/fuse_constraints/src/fixed_3d_landmark_constraint.cpp index 7a865c2a0..eae3d06d7 100644 --- a/fuse_constraints/src/fixed_3d_landmark_constraint.cpp +++ b/fuse_constraints/src/fixed_3d_landmark_constraint.cpp @@ -109,7 +109,7 @@ ceres::CostFunction* Fixed3DLandmarkConstraint::costFunction() const { // 2 Residuals Per 3D point return new ceres::AutoDiffCostFunction( - new Fixed3DLandmarkCostFunctor(sqrt_information_, mean_, observations_, pts3d_), 2*pts3d_.rows()); + new Fixed3DLandmarkCostFunctor(sqrt_information_, mean_, observations_, pts3d_), 2 * pts3d_.rows()); } } // namespace fuse_constraints diff --git a/fuse_constraints/src/fixed_3d_landmark_simple_covariance_constraint.cpp b/fuse_constraints/src/fixed_3d_landmark_simple_covariance_constraint.cpp index dae45b588..e60e6bcc6 100644 --- a/fuse_constraints/src/fixed_3d_landmark_simple_covariance_constraint.cpp +++ b/fuse_constraints/src/fixed_3d_landmark_simple_covariance_constraint.cpp @@ -107,7 +107,7 @@ void Fixed3DLandmarkSimpleCovarianceConstraint::print(std::ostream& stream) cons ceres::CostFunction* Fixed3DLandmarkSimpleCovarianceConstraint::costFunction() const { return new ceres::AutoDiffCostFunction( - new Fixed3DLandmarkSimpleCovarianceCostFunctor(sqrt_information_, mean_, observations_, pts3d_), pts3d_.rows()); + new Fixed3DLandmarkSimpleCovarianceCostFunctor(sqrt_information_, mean_, observations_, pts3d_), 2 * pts3d_.rows()); } } // namespace fuse_constraints