Brief Overview of Our Work

In this project, we write a program to help localize the Anki Cozmo robot rotationally. To do this, we first take many pictures of the robot's environment to help it "get its bearings." The first picture it takes denotes its "home position" Then, after a random rotation, either by external intervention or programmatically, the robot should be able to take pictures to try to figure out where it is. From this information, it should then rotate back to its home position.

We leverage a classic approach for image recognition. Images are converted to a basic matrix format, allowing for direct comparison and efficient difference detection. Normalization ensures consistent results across various images. This simple approach prioritizes both speed and accuracy.

Our Code and How to Use It

Image Gathering


One should first run the ImageGathering.ipynb which creates an images/ directory and populates it with images. Note that you need to update the parent_dir variable in the second code block of this file to reflect the actual file path on your computer. After this, this file can be run from top to bottom as a whole. As stated before, the first image taken becomes the robot's home location, so place the robot according to which direction you want to be the home position.

Sliding Window Localize


After the images/ folder is populated, one can now run the contents of SlidingWindowLocalize.ipynb. Note that this file contains a programmatic random rotation of the robot for testing purposes, but is commented out to allow for manual random rotations of the robot. In its current state, the robot will wait for the user to rotate it, then it will start the localization process.

As the robot continues to iterate, this file will print out histograms to the Jupyter Notebook output showing the robot's beliefs about where it is currently facing, which can be useful in seeing the robot zero in on its actual location. These histograms simply show how many locations in the current population are in each "bin."

Our meetings and work schedule

https://docs.google.com/spreadsheets/d/16hWd--q_TN8lJuDIef9HLJhNWOB7bDXDOw6YlULKtf4/edit?usp=drivesdk