Merge two set of points (2D coordinates)

asked 2015-06-11 07:21:48 -0600

Dben gravatar image

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.

Thanks

edit retag flag offensive close merge delete

Comments

Done with boost library. Clipper didn't work out

Dben gravatar image Dben  ( 2015-10-07 07:36:42 -0600 )edit