Problem Description
Hi,
I have had some problems with the ProjectInliers Filter for the SACMODEL cylinder.
The radius of the projected cylinder has been way too small.
After having a look at sac_model_cylinder.hpp and some debugging I found out that the fourth dimension of dir is nearly one, thus leading to a smaller radius, as this value is added:
pp += dir * coefficients->values[6];
Solution
I was able to get it working by changing
Eigen::Vector4f p(featureCloud->points[i].x, featureCloud->points[i].y, featureCloud->points[i].z, 1);
to
Eigen::Vector4f p(featureCloud->points[i].x, featureCloud->points[i].y, featureCloud->points[i].z, 0);
However, I am quite unsure about the math and also this step does not help if copy_data_fields is false.
Any ideas how to fix that generally?
Problem Description
Hi,
I have had some problems with the ProjectInliers Filter for the SACMODEL cylinder.
The radius of the projected cylinder has been way too small.
After having a look at sac_model_cylinder.hpp and some debugging I found out that the fourth dimension of
diris nearly one, thus leading to a smaller radius, as this value is added:pp += dir * coefficients->values[6];Solution
I was able to get it working by changing
Eigen::Vector4f p(featureCloud->points[i].x, featureCloud->points[i].y, featureCloud->points[i].z, 1);to
Eigen::Vector4f p(featureCloud->points[i].x, featureCloud->points[i].y, featureCloud->points[i].z, 0);However, I am quite unsure about the math and also this step does not help if
copy_data_fieldsis false.Any ideas how to fix that generally?