Lab 10
Objective:
In this lab, I implement grid locailization using a Bayes filter in simulation. With a provided simulation platform, I completed functions in skeleton code to reflect equations and formulae covered in class.
Completing the Skeleton Code
Compute Control
The control function returns the physical steps needed to go from the previous to the current pose of the virtual robot. To complete this transformation we must first rotate in place to align the previous pose with the current's position, translate the positional difference, and finally rotate again to match the orientation of the current pose.
Odometry Model
As per the equation in the lab handout, the odometry model function uses a multiplication of gaussians to determine the probability of the current pose given the previous and the applied control. This incorporates noise in each of the motions.
Prediction Step
In this step, we determine the probability of the virtual robot to be in every possible state given its previous state and motion. If there is a non-neligible likliehood of a state being correct, the odometry model is run on it. The probabilities of all states are normalized.
Update Step
In this step, we update the belief for each step as a function of the probability of the state from the sensor model and prediction step. Once again, we normalize across all the states.
Outcome Bayes Filter
Running the resulting Bayes Filter on the simulation platform yielded a number of runs where the belief on robot pose closely aligned with the ground truth. In the following run, we see the map bounds in white, ground truth in green, belief in blue, and highlighted squares to represent belief in position. The dots on the green and blue paths are estimations of position after each motion.
I credit Anya (2022) and Rafael (2023) for guiding me in this lab, and clearing misconcpetions I had about the prediction step.