Extra Feature #2: FSM Display on a Map

5/9/2010

We did an additional extra feature where we could display the current state of our navigational FSM on a map on our base station.  Once again we used a program in Java using the serial library to draw a dot on the region of the map that the FSM claims to be in.  This gets updated real time as the car sends back the following two-character strings each time the FSM transitions states:

“AA” (for state A), “BB” (for state B), C1, C2, C3, C4, C5, “DD”

Here are a few screenshots of this program in action:

The picture on the left shows a snapshot where the car is in C4.  The picture on the right shows what happens when the car encounters an obstacle in the straightaway “A” (at which point the program sends back the code “OB” to let the program know it’s hit an obstacle)