15-494/694 Cognitive Robotics: Lab 1

I. Meet Cozmo

  1. Get a robot, a charger, a Kindle, and a set of light cubes from the cabinet.
  2. Note the number on the bottom of your robot and the bottom of your Kindle. Make sure they match.
  3. Plug the charger into a power strip. Turn on the robot by placing it on the charger.
  4. Raise and lower the lift to reveal the robot's network name and WiFi password on the face display.
  5. Turn on the Kindle and start the Cozmo app.
  6. The app may offer you a choice of robots. Choose the one whose network name matches your robot, and connect to it.
  7. Exit SDK mode by pressing the "Exit SDK" button in the Cozmo app. Be careful that Cozmo doesn't wander off the table!
  8. Explore the Cozmo app. Play a game of Quick Tap.
  9. Re-enter SDK mode by pressing the settings icon in the top right corner of the screen, scrolling right, and selecting "Enter SDK Mode".

II. Introduction to cozmo-tools

  1. Log in to the workstation.
  2. Start a shell by typing control-alt-T.
  3. Connect the Kindle to the workstation via its USB cable.
  4. Look at the Kindle display. If you see a message asking "Allow USB debugging?" then check the "Always allow from this computer" box and then press OK.
  5. In a shell, type "adb devices" and you should see the Kindle listed. If the message says "Unauthorized" you need to go to the Kindle's Settings page, select "Device Options", scroll down to "Serial Number", and tap the button repeatedly until it reveals the "Developer Options" button. Then click on that and turn on USB debugging.
  6. Download a private copy of the cozmo-tools package by doing:
        $ cd
        $ git clone https://github.com/touretzkyds/cozmo-tools
    

  7. Run the simple_cli command line interpreter and display the camera viewer by doing:
        $ simple_cli
        C> show viewer
    
  8. Try showing Cozmo its cubes and see how they are displayed in the camera viewer. Also try showing Cozmo a face.
  9. Use dir(robot) to examine the fields of the variable robot, and similarly for world and cube1.
  10. Bookmark the Cozmo SDK documentation at https://data.bit-bots.de/cozmo_sdk_doc/cozmosdk.anki.com/docs/index.html and glance over the documentation for cozmo.robot and cozmo.world.
  11. Run the worldmap viewer by typing show worldmap_viewer to simple_cli. Press the "h" key in the worldmap viewer window for keyboard command help.
  12. Let Cozmo watch one of his cubes as you move it around, and observe how the display changes in the worldmap viewer.

III. Exploring the Occupancy Grid

  1. Press the "m" key in the worldmap viewer window to see Cozmo's occupancy grid.
  2. Type show particle_viewer to display the particle filter that cozmo-tools uses for localization.
  3. Type "h" in the particle filter window for keyboard help. Notice that you can use the WASD keys to drive Cozmo.
  4. Drive Cozmo around and watch how the occupancy grid representation changes.
  5. Try picking up Cozmo and putting him down in a position where he can't see any cubes. What happens?
  6. Using the WASD keys in the particle viewer window, turn Cozmo so he can see a cube. What happens in the worldmap viewer?

IV. Clean Up

  1. Quit Python by typing Control-\ (Control-backslash).
  2. Exit the Cozmo app on the Kindle. This is very important because as long as the app is running, Cozmo will be talking to his cubes and running down their batteries.
  3. Put the robot, charger, Kindle, USB cable, and light cubes back in the cabinet in the correct cubbyhole, and set them up so that both the robot and the Kindle are charging.
  4. Log out of the workstation. Do not power down the workstation! It needs to remain up so it can receive software updates.
There is no hand-in for this lab. We hope you had fun with it!


Dave Touretzky