ROS Answers: Open Source Q&A Forum - RSS feedhttps://answers.ros.org/questions/Open source question and answer forum written in Python and DjangoenROS Answers is licensed under Creative Commons Attribution 3.0Mon, 15 Nov 2021 06:39:34 -0600Want to check RANSAC for a known set of pointshttps://answers.ros.org/question/390917/want-to-check-ransac-for-a-known-set-of-points/I was just checking the functioning of my code implementing RANSAC sac_model: perpendicular by checking for a noiseless pointcloud. I have a few questions in the steps:
I did the following:
To generate noiseless point cloud:
1) I collected 3 points from my current point cloud being published , used an online plane equation calculator
![image description](/upfiles/16369651692967728.png)
2) The plane equation found here and the plane coefficents I find from RANSAC are same. So it is verified that my usage(implementation of RANSAC is correct I am assuming.)
But I need to verify by checking if all points lie on the plane in rviz
3) I generate 500 points using the
i) one of the points from pointcloud (also used in above equation to find eqn of plane)
ii) plane coefficients as normal vector
Almost all The 500 points have their z values close to -3;
That 500 points were generated in MATLAB coz I am more familiar in MATLAB coding.
I also visualize these points in MATLAB
I do not understand why enough inliers are not found considering all of them are generated from plane equation.
![image description](/upfiles/16369663253707407.png)
4) Now I copy my 500 points in a pcd file and read it in my code to perform RANSAC on the points. The RANSAC yields following error:![image description](/upfiles/1636966678516055.png)
Mon, 15 Nov 2021 03:02:07 -0600https://answers.ros.org/question/390917/want-to-check-ransac-for-a-known-set-of-points/Comment by osilva for <p>I was just checking the functioning of my code implementing RANSAC sac_model: perpendicular by checking for a noiseless pointcloud. I have a few questions in the steps:
I did the following:
To generate noiseless point cloud:
1) I collected 3 points from my current point cloud being published , used an online plane equation calculator
<img src="/upfiles/16369651692967728.png" alt="image description"></p>
<p>2) The plane equation found here and the plane coefficents I find from RANSAC are same. So it is verified that my usage(implementation of RANSAC is correct I am assuming.)
But I need to verify by checking if all points lie on the plane in rviz</p>
<p>3) I generate 500 points using the
i) one of the points from pointcloud (also used in above equation to find eqn of plane)
ii) plane coefficients as normal vector
Almost all The 500 points have their z values close to -3;
That 500 points were generated in MATLAB coz I am more familiar in MATLAB coding.
I also visualize these points in MATLAB
I do not understand why enough inliers are not found considering all of them are generated from plane equation.
<img src="/upfiles/16369663253707407.png" alt="image description"></p>
<p>4) Now I copy my 500 points in a pcd file and read it in my code to perform RANSAC on the points. The RANSAC yields following error:<img src="/upfiles/1636966678516055.png" alt="image description"></p>
https://answers.ros.org/question/390917/want-to-check-ransac-for-a-known-set-of-points/?comment=390934#post-id-390934Whatâ€™s your ratio of inliers vs outliers?Mon, 15 Nov 2021 06:39:34 -0600https://answers.ros.org/question/390917/want-to-check-ransac-for-a-known-set-of-points/?comment=390934#post-id-390934