small_gicp
termination_criteria.hpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright 2024 Kenji Koide
2 // SPDX-License-Identifier: MIT
3 #pragma once
4 
5 #include <Eigen/Core>
6 
7 namespace small_gicp {
8 
12  TerminationCriteria() : translation_eps(1e-3), rotation_eps(0.1 * M_PI / 180.0) {}
13 
17  bool converged(const Eigen::Matrix<double, 6, 1>& delta) const { return delta.template head<3>().norm() <= rotation_eps && delta.template tail<3>().norm() <= translation_eps; }
18 
19  double translation_eps;
20  double rotation_eps;
21 };
22 
23 } // namespace small_gicp
Definition: flat_container.hpp:12
Registration termination criteria.
Definition: termination_criteria.hpp:10
double rotation_eps
Translation tolerance.
Definition: termination_criteria.hpp:20
bool converged(const Eigen::Matrix< double, 6, 1 > &delta) const
Check the convergence.
Definition: termination_criteria.hpp:17
double translation_eps
Rotation tolerance [rad].
Definition: termination_criteria.hpp:19
TerminationCriteria()
Constructor.
Definition: termination_criteria.hpp:12