Slam code extracted from LidarView without any modification.