For this lab, I chose to do the position control task.
The robot started at the designated line, which was <4m from the wall, and drove towards the center of the sticky mat. The setup is shown in the picture below.
I used the following code to time my robot do a flip at 0.5m from the wall. The robot drove at full speed forward for a set number of seconds, and then immediately started driving backward at full speed for a set number of seconds.
Below are videos of three trials in which my robot was able to successfully perform a flip.
Below are the plots from the TOF sensors for the three trials. The distance data was collected until the flip.