
Welcome to Better than Mice
Vision Statement (original)
Phase One
TurtleBot explores an unknown maze while concurrently building a map of its surroundings.
Phase Two
Based on the returned pattern, we created an algorithm to optimize this path. We again send the turtlebot to the maze from the same starting point. This time the turtlebot should reach to the same fixed target point with less traveling time.

Vision Statement (revised)
TurtleBot explores an unknown maze while concurrently building a map of its surroundings and localizing itself inside of the map
Mobile Application controls TurtleBot: start, stop, map-view, current location


Methods
Wall-Following: SLAM, RViz
Server: CherryPy, ROSPy
Mobile Application: Flutter
Requirements
Ubiquitous
No Turtle should hit a wall of the maze.
The Turtle’s goal is to traverse the whole maze.
A mobile application should be used as input to communicate with Turtle.
The same mobile application should be used as output to display pathing and Turtle position.
Event-Driven
When the buttons are tapped on the mobile application, the robot respond accordingly.
State-Driven
While the Turtle is traversing the maze the first time, use SLAM to localize, map, and drive.
While the Turtle is traversing the maze, display SLAM map and location on mobile application.


Testing
We tested consistently throughout, watching our TurtleBot’s movements and reactions change as we modified the code. For crude and initial testing, we used our own hands (or objects being held in our hand) moving at various distances from the TurtleBot camera to see how its wheelspeed would be affected.
Once we had some code, we tested the wall-following with just one maze “wall”; a single piece of plywood. Once we were satisfied with it simply working correctly, we built a small, 5ft x 5ft maze to watch it perform on. We used this “mini-maze” test method for the majority of our project testing; it was a great example of how local optimization (on a small-scale maze) would transform into global optimization (for a large-scale maze). With this “mini-maze”, we optimized the wall-following code to travel at the right distance from the wall, use the correct turning radius around corners, and change its speed accordingly. We also ran lots of tests with the “mini-maze” to test out the mobile application functionality.
Finally, we built the large-scale maze, and we were content with the results.
Hazards & Quality Concerns
Phase 1
The TurtleBot wall-following program is very sensitive to the size of the gaps in the maze. In order to ensure proper execution, the TurtleBot needs to be able to bind itself to the nearest left wall. If the gap is too small, the turtle might accidentally bind to another wall while turning, and then bind back to the original wall, creating a sort of thrashing side effect. To combat this, we ensured the gaps were of a properly accommodating size.
The localization of the TurtleBot to an (x, y) coordinate is not super consistent, so sometimes the bot does not appear in the correct location in the maze on the mobile application.
The map (coming from RViz) was flipped along the x-axis and quite small, so creating a good UX on the mobile application was difficult.
Phase 2
Our idea here was that, once we have the maze in array format, we simply utilize the A* pathfinding algorithm to calculate the shortest path as a series of waypoints. Based on this path, we send the TurtleBot to each waypoint. However, during the initial stages of phase 2, we found out that the TurtleBot suffers from the low precision of localizing its own coordinates. Also, we found that we needed to account for the TurtleBot's size and a minimum distance between the TurtleBot and the walls, since the shortest path would likely be directly up against some walls. In conclusion, we did not complete phase 2 based on these reasons, and because of the unexpected (slightly higher than we thought) difficulty of the phase 1.

Demonstration
A short video demonstrating our mobile application, CherryPy server, and TurtleBot controller working together in unison.
The Better than Mice: The Team

Isaiah Ritter
Mobile Application
GUI
Mapping

Luke Siela
Wall Follower
Shortest Path
Mapping

Eric Tsai
Wall Follower
Shortest Path
Mapping

Blaise von Ohlen
Wall Follower
Shortest Path
Mapping
