From 053949566f6f0ac228089ce3ed9c106c8d33fc6f Mon Sep 17 00:00:00 2001 From: h-ohta Date: Fri, 16 Feb 2024 12:43:52 +0900 Subject: [PATCH 1/5] fix covar -> cov --- .../voxel_grid_nearest_centroid.hpp | 12 ++++++------ .../voxel_grid_nearest_centroid_impl.hpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp index 44b2f0dfe6ef0..b8eddc27757c6 100644 --- a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp +++ b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp @@ -217,7 +217,7 @@ class VoxelGridNearestCentroid : public VoxelGrid : searchable_(true), // min_points_per_voxel_ (6), min_points_per_voxel_(1), - // min_covar_eigenvalue_mult_ (0.01), + // min_cov_eigenvalue_mult_ (0.01), leaves_(), voxel_centroids_(), voxel_centroids_leaf_indices_(), @@ -258,12 +258,12 @@ class VoxelGridNearestCentroid : public VoxelGrid inline int getMinPointPerVoxel() { return min_points_per_voxel_; } /** \brief Set the minimum allowable ratio between eigenvalues to prevent singular covariance - * matrices. \param[in] min_covar_eigenvalue_mult the minimum allowable ratio between eigenvalues + * matrices. \param[in] min_cov_eigenvalue_mult the minimum allowable ratio between eigenvalues */ // inline void - // setCovEigValueInflationRatio (double min_covar_eigenvalue_mult) + // setCovEigValueInflationRatio (double min_cov_eigenvalue_mult) // { - // min_covar_eigenvalue_mult_ = min_covar_eigenvalue_mult; + // min_cov_eigenvalue_mult_ = min_cov_eigenvalue_mult; // } /** \brief Get the minimum allowable ratio between eigenvalues to prevent singular covariance @@ -272,7 +272,7 @@ class VoxelGridNearestCentroid : public VoxelGrid // inline double // getCovEigValueInflationRatio () // { - // return min_covar_eigenvalue_mult_; + // return min_cov_eigenvalue_mult_; // } /** \brief Filter cloud and initializes voxel structure. @@ -517,7 +517,7 @@ class VoxelGridNearestCentroid : public VoxelGrid /** \brief Minimum allowable ratio between eigenvalues to prevent singular covariance * matrices. */ - // double min_covar_eigenvalue_mult_; + // double min_cov_eigenvalue_mult_; /** \brief Voxel structure containing all leaf nodes (includes voxels with less than * a sufficient number of points). */ diff --git a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid_impl.hpp b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid_impl.hpp index 6298c4a2e4153..a42b43b448080 100644 --- a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid_impl.hpp +++ b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid_impl.hpp @@ -300,7 +300,7 @@ void pcl::VoxelGridNearestCentroid::applyFilter(PointCloud & output) // Eigen values less than a threshold of max eigen value are inflated to a set fraction of the // max eigen value. - // double min_covar_eigenvalue; + // double min_cov_eigenvalue; for (typename std::map::iterator it = leaves_.begin(); it != leaves_.end(); ++it) { // Normalize the centroid From c7de7e879542682d4d8fd75007f0e9f69323d0d9 Mon Sep 17 00:00:00 2001 From: h-ohta Date: Fri, 16 Feb 2024 12:48:05 +0900 Subject: [PATCH 2/5] fix evals and evecs --- .../voxel_grid_nearest_centroid.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp index b8eddc27757c6..2ebd8233db134 100644 --- a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp +++ b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp @@ -111,8 +111,8 @@ class VoxelGridNearestCentroid : public VoxelGrid struct Leaf { /** \brief Constructor. - * Sets \ref nr_points, \ref icov_, \ref mean_ and \ref evals_ to 0 and \ref cov_ and \ref - * evecs_ to the identity matrix + * Sets \ref nr_points, \ref icov_, \ref mean_ and \ref e_vals_ to 0 and \ref cov_ and \ref + * e_vecs_ to the identity matrix */ Leaf() : nr_points(0), @@ -120,8 +120,8 @@ class VoxelGridNearestCentroid : public VoxelGrid centroid() // cov_ (Eigen::Matrix3d::Identity ()), // icov_ (Eigen::Matrix3d::Zero ()), - // evecs_ (Eigen::Matrix3d::Identity ()), - // evals_ (Eigen::Vector3d::Zero ()) + // e_vecs_ (Eigen::Matrix3d::Identity ()), + // e_vals_ (Eigen::Vector3d::Zero ()) { } @@ -159,7 +159,7 @@ class VoxelGridNearestCentroid : public VoxelGrid // Eigen::Matrix3d // getEvecs () const // { - // return (evecs_); + // return (e_vecs_); // } /** \brief Get the eigen values of the voxel covariance. @@ -169,7 +169,7 @@ class VoxelGridNearestCentroid : public VoxelGrid // Eigen::Vector3d // getEvals () const // { - // return (evals_); + // return (e_vals_); // } /** \brief Get the number of points contained by this voxel. @@ -195,10 +195,10 @@ class VoxelGridNearestCentroid : public VoxelGrid // Eigen::Matrix3d icov_; /** \brief Eigen vectors of voxel covariance matrix */ - // Eigen::Matrix3d evecs_; + // Eigen::Matrix3d e_vecs_; /** \brief Eigen values of voxel covariance matrix */ - // Eigen::Vector3d evals_; + // Eigen::Vector3d e_vals_; PointCloud points; }; From fe15267771f4549d242dccd87bae771f8894fa76 Mon Sep 17 00:00:00 2001 From: h-ohta Date: Fri, 16 Feb 2024 12:53:01 +0900 Subject: [PATCH 3/5] fix --- .../voxel_grid_nearest_centroid.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp index 2ebd8233db134..11c27908f7969 100644 --- a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp +++ b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp @@ -111,8 +111,8 @@ class VoxelGridNearestCentroid : public VoxelGrid struct Leaf { /** \brief Constructor. - * Sets \ref nr_points, \ref icov_, \ref mean_ and \ref e_vals_ to 0 and \ref cov_ and \ref - * e_vecs_ to the identity matrix + * Sets \ref nr_points, \ref icov_, \ref mean_ and \ref eigen_values_ to 0 and \ref cov_ and \ref + * eigen_vectors_ to the identity matrix */ Leaf() : nr_points(0), @@ -120,8 +120,8 @@ class VoxelGridNearestCentroid : public VoxelGrid centroid() // cov_ (Eigen::Matrix3d::Identity ()), // icov_ (Eigen::Matrix3d::Zero ()), - // e_vecs_ (Eigen::Matrix3d::Identity ()), - // e_vals_ (Eigen::Vector3d::Zero ()) + // eigen_vectors_ (Eigen::Matrix3d::Identity ()), + // eigen_values_ (Eigen::Vector3d::Zero ()) { } @@ -159,7 +159,7 @@ class VoxelGridNearestCentroid : public VoxelGrid // Eigen::Matrix3d // getEvecs () const // { - // return (e_vecs_); + // return (eigen_vectors_); // } /** \brief Get the eigen values of the voxel covariance. @@ -169,7 +169,7 @@ class VoxelGridNearestCentroid : public VoxelGrid // Eigen::Vector3d // getEvals () const // { - // return (e_vals_); + // return (eigen_values_); // } /** \brief Get the number of points contained by this voxel. @@ -195,10 +195,10 @@ class VoxelGridNearestCentroid : public VoxelGrid // Eigen::Matrix3d icov_; /** \brief Eigen vectors of voxel covariance matrix */ - // Eigen::Matrix3d e_vecs_; + // Eigen::Matrix3d eigen_vectors_; /** \brief Eigen values of voxel covariance matrix */ - // Eigen::Vector3d e_vals_; + // Eigen::Vector3d eigen_values_; PointCloud points; }; From 2556ef8bfc84bd1e293e3acf254b25deb34df489 Mon Sep 17 00:00:00 2001 From: h-ohta Date: Fri, 16 Feb 2024 12:55:19 +0900 Subject: [PATCH 4/5] fix --- .../tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp index 11c27908f7969..6b57d53281d56 100644 --- a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp +++ b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp @@ -153,21 +153,21 @@ class VoxelGridNearestCentroid : public VoxelGrid // } /** \brief Get the eigen vectors of the voxel covariance. - * \note Order corresponds with \ref getEvals + * \note Order corresponds with \ref getEigenValues * \return matrix whose columns contain eigen vectors */ // Eigen::Matrix3d - // getEvecs () const + // getEigenVectors () const // { // return (eigen_vectors_); // } /** \brief Get the eigen values of the voxel covariance. - * \note Order corresponds with \ref getEvecs + * \note Order corresponds with \ref getEigenVectors * \return vector of eigen values */ // Eigen::Vector3d - // getEvals () const + // getEigenValues () const // { // return (eigen_values_); // } From f269f193c72be42a389c426ae279d8f97880456c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 03:59:43 +0000 Subject: [PATCH 5/5] style(pre-commit): autofix --- .../tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp index 6b57d53281d56..1fc1249b59e50 100644 --- a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp +++ b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp @@ -111,8 +111,8 @@ class VoxelGridNearestCentroid : public VoxelGrid struct Leaf { /** \brief Constructor. - * Sets \ref nr_points, \ref icov_, \ref mean_ and \ref eigen_values_ to 0 and \ref cov_ and \ref - * eigen_vectors_ to the identity matrix + * Sets \ref nr_points, \ref icov_, \ref mean_ and \ref eigen_values_ to 0 and \ref cov_ and + * \ref eigen_vectors_ to the identity matrix */ Leaf() : nr_points(0),