Anki Cozmo Kidnapping using Monte Carlo Localization

Nicholas Stach, Quan Nguyen, Brayton Alkinburgh, Douglas Harsha
Spring 2023
Src code ( github, zip[1])

Goal:


Table of Contents

  1. Setup
  2. Understanding algorithm
  3. Tasks
  4. Files and Dirs
  5. Approaches
  6. Running
  7. Working log

Setup

Following the installation guide from Cozmo

[Back to top]


Understanding algorithm

In our code, there are comments that refer to table, etc. Those refer to the algorithms from the "Probabilistic Robotics" by Sebastian Thrun, Wolfram Burgard and Dieter Fox.

[Back to top]


Tasks

[Back to top]


Files and Dirs

[Back to top]


Approaches

[Back to top]


Running

[Back to top]


Future Goals

Stitching method

The stitching algorithm used in this project would sometimes struggle with environments with few landmarks or excess/lack of light, thus not stitching all images together (issue from OpenCV). This would create a panorama that was not a true 360 degree view. Future groups could attempt a different stitching algorithm or attempt to build a world map in a different way. Our group recommendation is to avoid the use of a panorama (stitched from images) all together, as it proved too brittle for varied environments and was never as accurate as we had wanted. Other groups in this semester reported similar negative findings on the use of a panorama as well.

Future groups could also rework our MCL to where Cozmo does not stop localizing until a certain belief probability/number of predictions for a location is reached. Our current implementation only rotates 10 times to localize before committing to the final belief probabilities.

Our group's localization also relied on a program to randomly determine a kidnap location and then would automatically run MCL to localize. Future groups could have Cozmo map it's environment, then be in a state where it tries localize if it believes it is not at "home."

NeuralNet method

We would love to hear results from those groups that want to continue our work. Here are some suggestions to try:

[Back to top]


Working log

Click to expand
Data/Time Activity Member
3/17: 1:00-2:00pm Setup Project Brayton & Nick
3/23: 4:15-5:15pm Setup Project & Doc of steps Doug & Nick
3/24: 1:00-5:00pm Connect to Cozmo, implement basic MCL & pic collection Doug, Quan & Nick
3/29: 2:00-5:00pm MCL, refine code for pic collection Doug, Quan & Nick
3/31: 2:00-4:45pm Done take1Pic, kidnap Doug, Quan & Nick
3/31: 5:15-6:30pm Modify and fix bug in MCL Quan
4/1: 1:00-1:50am Add MSE+Cos_Similar, try MCL, bad result --> suggest creating pano Quan
4/5: 3:30-5:30pm Image stiching for creation of pano Quan & Nick
4/7: 1:20-3:30pm Image cropping, MCL redo Nick, Quan, Brayton
4/7: 3:30-4:30 pm MCL redo Nick, Quan
4/12: 2:20-4:50pm Working on new MCL based on previous group efforts Nick
4/12: 7:00-7:50pm MCL debugging Nick
4/14: 1:00-2:30pm MCL testing/debugging Brayton
4/14: 1:00-5:20pm MCL testing/debugging Nick
4/16: 9:20-10:00pm Make Cozmo relocalize after MCL Nick
4/16: 2:00-4:30pm Make Cozmo relocalize after MCL Nick
4/21: 1:00-2:30pm Cozmo localization tuning, website with documentation Nick, Doug, Brayton
4/21: 2:30-5:40pm Cozmo localization tuning, bins for histogram Nick
4/21: 5:00-7:00pm Modifying pic collection Brayton
4/22: 8:00-9:00pm Modified kidnap Brayton
4/23: 7:00-10:00pm Modified MCL to use new map system Brayton
4/24: 9:30-10:30am Changing MCL and supplementary files Brayton
4/24: 1:00-2:00pm Documentation and archiving of work Nick, Quan, Brayton
4/24: 10:00-12:00pm Write website framework, outline, review final code Doug
4/25: 5:15-8:30pm Clean code, add html-generator, create dataset (1440 imgs) Quan
4/25: 7:00-12:00am Implement sentence_transformers, found unuseful with pretrained (clip-ViT-B-32) Brayton
4/26: 10:00-3:00am Populate website, write copy, finalize website objects and sections Doug
4/26: 11:00-12:15pm Add baseline to train siamese network Quan
4/26: 1:30-3:30pm Add training loop Quan
4/27: 4:30-6:30am Fine-tuned model on our dataset (success) Quan
4/28: 7:30-8:30pm Write doc + clean code + publish website Quan, Nick
5/3: 1:30-5:30pm Clean + factorize code --> found errors, integrate NN model into MCL Quan
5/4: 2:30-6:00pm Debugging, creating separate branch for finished work in Github Nick
5/4: 1:00-7:45pm Continue work on 5/3 Quan
5/5: 1:00-2:00pm Finalize NeuralNet approach. Ran test on GG-Colab; did not have chance to test w/ robot Quan
5/5: 2:00-3:00pm Cont. cleaning code -> give up since the cozm_MCL.py and kidnap.py are such a huge mess & finalize README Quan

[Back to top]