Project 2 - Map-Making+SLAM with real Lidar data
MAGNA
Steps to create an occupancy grid map with ground truth trajectory:
- Load the ground truth trajectory and the Lidar scan data.
- Create an empty occupancy grid map with the desired resolution and size based on the area being explored.
- For each Lidar scan data, apply the scan matching algorithm to align it with the previous scan data, and obtain the relative motion information between them using odometry data.
- Update the occupancy grid map based on the current scan's measurements and the estimated robot pose.
- Record the ground truth pose of the robot for each scan and plot it on the map.
- The cells are updated dynamically as the robot moves through the environment and thus real-time mapping of the environment.
Steps to solve the SLAM problem with FastSLAM algorithm to create the map and the trajectory:
- Load the pre-processed dataset, which includes the odometry and Lidar scan information.
- Initialize a set of particles to represent the possible robot poses and the map.
- For each new Lidar scan and odometry information, perform the following steps:
- For each particle, predict the new robot pose based on the odometry information.
- Apply the scan matching algorithm to align the new Lidar scan with the particle's predicted pose and estimate the robot's pose.
- Update the particle's weight based on the match between the predicted Lidar measurements and the actual Lidar measurements.
- Resample the particles based on their weights to generate a new set of particles for the next iteration.
- Update the map based on the final particle set.