Iterative closest point (ICP) is an algorithm employed to minimize the difference between two clouds of points, and widely used in localization of robot.
In this document, you should have two point cloud data 1 .Map(map.pcd) 2. Bag(obtained from your sensor) And you are going to use these point cloud data to localize the car by ICP algorithm.
- Use PCL Library to perform ICP algorithm, and localize the car
- Publish tf to visualize scan matching process
- Load map
- Subscribe point cloud
- Implement ICP using PCL
- Publish tf
ROS provides a package tf to maintain the relationship between different coordinate frame. After you successfully publish the tf, it would be able to see the current scan and map in the same frame. For more implementation details, see this http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20broadcaster%20(C%2B%2B)
To ensure your bag time and ROS time are the same, you may need to type the following command to play bag:
rosparam set use_sim_time true
rosbag play -r 0.3 sdc_hw5.bag --clock