ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Is ICP (or laser_scan_matcher) Deterministic?

asked 2019-03-13 00:29:25 -0500

adayoegi gravatar image

I am currently using laser_scan_matcher which applies csm for PLICP implementation.

I have heard that ICP is a deterministic and optimal algorithm, theoretically, but it may not be optimal due to practical implementation. However, it should still be deterministic.

Now the problem comes. I recorded a bag file with /odom and /laser/scan, replayed with use_sim_time=true and tf/static_transform_publisher to publish /tf or /tf_static from base to laser. The output is reocrded into another rosbag for observation.


  1. The output (/pose2D from laser_scan_matcher) of 2 different runs on the same computer are identical (except time) if base to laser tf is published on /tf_static.

  2. The output of 2 different runs on the same computer are different if base to laser tf is published on /tf.

  3. The output of 2 different runs on 2 different computers (14.04 vs 16.04) are different.

  4. The output of 2 different runs on the same computer are different with different replay rate (normal vs slower).

For those different cases, it seems to be floating point difference in the beginning, but eventually the difference goes larger and larger. Besides, sometimes the number of msgs are different as well.

I know that ROS itself is not deterministic during topic communication. However, I am not sure the reason why it still gets identical result under some condition, while others do not.

Originally I was expecting all the 4 settings should get identical results. Could anyone please tell why it is not the case?

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-19 03:52:24 -0500

adayoegi gravatar image

Problems solved.

In short, the PLICP algorithm in laser_scan_matcher is deterministic, while the whole package's I/O are not due to ROS topic communication.

Anyone interested in this may check with modifying the package:
1. Disable subscribers
2. Read your rosbag using C++ API
3. Directly write the result into a file

Then you can see the results are identical everytime.
Thus we can conclude that the differences are from ROS topic communication. My observation 1 may just be a coincidence.

edit flag offensive delete link more

Question Tools



Asked: 2019-03-13 00:29:25 -0500

Seen: 338 times

Last updated: Mar 19 '19