Is ICP (or laser_scan_matcher) Deterministic?
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.
Observations:
The output (
/pose2D
fromlaser_scan_matcher
) of 2 different runs on the same computer are identical (excepttime
) if base to laser tf is published on/tf_static
.The output of 2 different runs on the same computer are different if base to laser tf is published on
/tf
.The output of 2 different runs on 2 different computers (14.04 vs 16.04) are different.
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.