Skip to content

Commit

Permalink
Merge pull request #5821 from gaishunhua/master
Browse files Browse the repository at this point in the history
sac_model_cylinder: fix bug in projectPointToCylinder function
  • Loading branch information
mvieth authored Sep 23, 2023
2 parents b5ce8f5 + eccb2d1 commit 7cc21f7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ pcl::SampleConsensusModelCylinder<PointT, PointNT>::projectPointToCylinder (
Eigen::Vector4f line_pt (model_coefficients[0], model_coefficients[1], model_coefficients[2], 0.0f);
Eigen::Vector4f line_dir (model_coefficients[3], model_coefficients[4], model_coefficients[5], 0.0f);

float k = (pt.dot (line_dir) - line_pt.dot (line_dir)) * line_dir.dot (line_dir);
float k = (pt.dot (line_dir) - line_pt.dot (line_dir)) / line_dir.dot (line_dir);
pt_proj = line_pt + k * line_dir;

Eigen::Vector4f dir = pt - pt_proj;
Expand Down

0 comments on commit 7cc21f7

Please sign in to comment.