Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sac_model_cylinder: fix bug in projectPointToCylinder function #5821

Merged
merged 2 commits into from
Sep 23, 2023

Conversation

gaishunhua
Copy link
Contributor

No description provided.

Refer to the relevant calculation codes in other functions. Multiplication here should be changed to division.

like
"projectPointToLine (const Eigen::Vector4f &pt,
                          const Eigen::Vector4f &line_pt,
                          const Eigen::Vector4f &line_dir,
                          Eigen::Vector4f &pt_proj) const
      {
        float k = (pt.dot (line_dir) - line_pt.dot (line_dir)) / line_dir.dot (line_dir);
        // Calculate the projection of the point on the line
        pt_proj = line_pt + k * line_dir;
      }

"
Copy link
Member

@mvieth mvieth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mvieth mvieth added module: sample_consensus changelog: fix Meta-information for changelog generation labels Sep 22, 2023
@mvieth mvieth changed the title Fix bug in sac_model_cylinder.hpp the projectPointToLine {},fix projection distance calculation method sac_model_cylinder: fix bug in projectPointToCylinder function Sep 22, 2023
@mvieth mvieth merged commit 7cc21f7 into PointCloudLibrary:master Sep 23, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Meta-information for changelog generation module: sample_consensus
Projects
None yet
2 participants