Lab 12: Path Planning and Execution


In our final lab, my robot will navigate through a predetermined maze, and it must make a stop at all of the specified waypoints. The layout of the map is as shown below, with the small green dots representing the waypoints.

Maze

Implementation Discussion

Unfortunately, I was unable to achieve accurate and reliable localization results using my ToF sensor data and the provided localization program, which I documented in my Lab 11 writeup. Even though my polar plot of the ToF sensor readings looked like the robot's surroundings, the localization algorithm would predict the wrong location the majority of the time. If I had more time, I would continue to debug my localization since it is the most reliable way to complete Lab 12; however, I had to leave campus early, so I will not be using localization in my map navigation, as it will likely provide innacurate results.

Instead, I will still try to be as accurate as possible with my navigation by using feedback control to detect the robot's current state and determine its next move. My approach divides the map traversal into two parts: straight-line forward pathing and counterclockwise rotation. At every waypoint, the robot rotates to a set angle using closed-loop feedback control. The decision to continue rotating or stop depends on the input yaw value received from the robot's IMU. This method works well because the IMU performs very rapid data collection, so the angle that the robot turns to is relatively precise and consistent. To travel from waypoint to waypoint, the robot is programmed to move forward a certain distance by driving the motors for a predetermined period of time. This open-loop method for straight-line movement is used because my robot's ToF sensors sometimes mistakenly detect things that are not there, causing it to output inaccurate measurements that are much lower than they should be. Since the navigation task is quite long, I would need the ToF sensors to consistently output accurate readings, so I decided to forego this method. In the end, I found that this combination of turning and moving forward worked sufficiently well for my robot to navigate the map.





Thank you to all the TAs for making this class as intriguing and fun as it was rigorous. I was able to explore a variety of topics in robotics, and I am excited to continue following my passion for robotics into the future. I am especially thankful for my Wednesday lab TAs, Anya and Jonathan, who patiently explained confusing concepts to me, were very willing to spend time to help me debug my robot, and were overall the most supportive and kind TAs I have had <3