diff --git a/src/icp.h b/src/icp.h index d93e738788c21de238f70eec279f5f59be8eff80..0b0863de4f4db771c9c11f6ba5616325f28f5220 100644 --- a/src/icp.h +++ b/src/icp.h @@ -26,29 +26,27 @@ #include <chrono> #include <random> #include <csm/csm_all.h> -// using namespace CSM; +#undef max //undefine macro of csm that may interfere with std::max +#undef min //undefine macro of csm that may interfere with std::min namespace laserscanutils{ struct icpOutput{ - bool valid; /** if the result is valid */ - Eigen::Vector3s res_transf; - Eigen::Matrix3s res_covar; - int nvalid; /** Number of valid correspondence in the end */ - double error; /** Total correspondence error */ + bool valid; // If the result is valid + Eigen::Vector3s res_transf; // Transformation found + Eigen::Matrix3s res_covar; // Covariance of the transformation + int nvalid; // Number of valid correspondences in the match + double error; // Total correspondence error }; struct icpParams { - bool verbose; // prints debug messages + bool verbose; // prints debug messages // Algorithm options --------------------------------------------------- bool use_point_to_line_distance; // use PlICP (true) or use vanilla ICP (false). - - /** Maximum angular displacement between scans (deg)*/ - double max_angular_correction_deg; - /** Maximum translation between scans (m) */ - double max_linear_correction; + double max_angular_correction_deg; // Maximum angular displacement between scans (deg) + double max_linear_correction; // Maximum translation between scans (m) // Stopping criteria int max_iterations; // maximum iterations @@ -63,12 +61,12 @@ struct icpParams bool debug_verify_tricks; // Restart algorithm - bool restart; + bool restart; // Enable restarting double restart_threshold_mean_error; // Threshold for restarting double restart_dt; // Displacement for restarting double restart_dtheta; // Displacement for restarting - // Discarding points or correpondences --------------------------------------------------- + // Discarding points or correspondences --------------------------------------------------- /** discard rays outside of this interval */ double min_reading, max_reading; /** Percentage of correspondences to consider: if 0.9,