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.0Wed, 07 Oct 2015 07:36:42 -0500Merge two set of points (2D coordinates)https://answers.ros.org/question/211077/merge-two-set-of-points-2d-coordinates/Hello,
The situation is as follows:
I'm on RVIZ, driving a robot on a 2D plan. I can get points from where I go thanks to odometry.
Later I will add my sensors (IMU and laser scanner), use a Kalman filter to get the points I can really trust, but I'm still far from it.
Let's say, I miss some points (or a lot), and I get something like that http://imgur.com/EN2Tduj,5jlxbhj,YCvUMSa . The first image is the real path, the second is a first try with some points missings and the 3rd one is with other points missing. I took others here just for the example.
Let's assume I don't to take shortcuts and the black on the image represents obstacles. I think it is exagerated, but in that kind of scenario. I would have to merge this 2 sets of points, to get the maximum surface of them.
It is obvious, but I also don't have the same number of points for both sets.
Is there an algorithm which does that ? I searched for some, I went across *Cartesian product*, but it will not do what I want, it takes the product (intersection), and I think I would need the union.
ThanksThu, 11 Jun 2015 07:21:48 -0500https://answers.ros.org/question/211077/merge-two-set-of-points-2d-coordinates/Comment by Dben for <p>Hello,</p>
<p>The situation is as follows:
I'm on RVIZ, driving a robot on a 2D plan. I can get points from where I go thanks to odometry.
Later I will add my sensors (IMU and laser scanner), use a Kalman filter to get the points I can really trust, but I'm still far from it.</p>
<p> Let's say, I miss some points (or a lot), and I get something like that <a href="http://imgur.com/EN2Tduj,5jlxbhj,YCvUMSa">http://imgur.com/EN2Tduj,5jlxbhj,YCvUMSa</a> . The first image is the real path, the second is a first try with some points missings and the 3rd one is with other points missing. I took others here just for the example. </p>
<p>Let's assume I don't to take shortcuts and the black on the image represents obstacles. I think it is exagerated, but in that kind of scenario. I would have to merge this 2 sets of points, to get the maximum surface of them.
It is obvious, but I also don't have the same number of points for both sets.</p>
<p>Is there an algorithm which does that ? I searched for some, I went across <em>Cartesian product</em>, but it will not do what I want, it takes the product (intersection), and I think I would need the union.</p>
<p>Thanks</p>
https://answers.ros.org/question/211077/merge-two-set-of-points-2d-coordinates/?comment=218773#post-id-218773Done with boost library. Clipper didn't work outWed, 07 Oct 2015 07:36:42 -0500https://answers.ros.org/question/211077/merge-two-set-of-points-2d-coordinates/?comment=218773#post-id-218773