In Exploration 3, we modified a provided sample program to read four RPS positions and headings from the SD card and then use RPS to navigate the path between them. For each point, a check_heading
routine continuously compared the desired heading to the heading reported by RPS and turned a small amount in the necessary direction until the error between them was deemed “acceptable”. We also wrote check_x
and check_y
routines to do the same but for X- and Y-coordinates, respectively. Combining these routines enabled us to complete the checkpoint successfully, though the path ultimately followed was non-optimal due to undiscovered bug(s) in the code.
The Exploration worksheet is available here.