pglira / simpleICP

Implementations of a rather simple version of the Iterative Closest Point algorithm in various languages.
MIT License
299 stars 60 forks source link

No transform for Lidar Scans #6

Closed alre5639 closed 2 years ago

alre5639 commented 3 years ago

I am attempting to use this ICP algorithm as part of my SLAM model but every H found states my robot is not moving (H = I).

Setup: I have 2D Lidar with a 180 degree FOV that publishes a 150 point pointcloud @ 10Hz. I would like to find some H between each Lidar Scan (or at least between some) to correct my dynamics model.

Attached are 2 lidar scans taken consecutively (I had to change them to txt for upload). I have noticed that after the reject() function there are no differences left so pehaps I just need to tune the parameters? I have tried messing with the parameters a bit (like setting min_planarity arbitrarily high) but have had no luck.

I appreciate the help!

test_point_cloud (copy).txt test_point_cloud_minus_one (copy).txt

pglira commented 3 years ago

The issue is that your point clouds are 2D only (z coordinate is always = 0).

simpleICP works on 3D point clouds only at the moment.

image

ya1gaurav commented 3 years ago

@alre5639 did you find any way to fix it?

pglira commented 3 years ago

It should be fairly easy to just drop the third dimension in the code.

ya1gaurav commented 3 years ago

@pglira suppose i want to detect presence of a mug, how can i do that with 2d scanner?

pglira commented 2 years ago

I close this issue as the discussion is off topic now.

(However, if you want to detect a mug in a point cloud it might help to estimate the curvature attribute of the points, e.g. using PDAL)