15-494/694 Cognitive Robotics: Lab 1
I. Meet Cozmo
- Get a robot, a charger, a Kindle, and a set of lightcubes from the cabinet.
- Raise and lower the lift to reveal the robot's network name and WiFi password.
- Connect the Kindle to the robot's WiFi network. The Kindle's
WiFi Settings page will tell you "Internet service not working".
That's because you're connected to a robot, not the Internet. It's
- Run the Cozmo app.
- Let Cozmo run around and see his light cubes, but don't let him fall off the table!
- Use the app to play a game of Quick Tap with Cozmo.
II. Build a Corral for Cozmo
- To keep Cozmo from falling off the table, we will keep him in a corral
constructed of Lego bricks.
- Get some bricks from the tub and build a corral roughly 2 feet square.
- Let Cozmo run around in his corral.
III. Introduction to the Cozmo SDK
- Log in to the workstation. If Andrew logins aren't working yet
you may need to use a guest account. If you want to run the software
on your laptop, you will need to install Ubuntu 16.04 and then run
this setup script.
- Clone a copy of the SDK by doing:
$ git clone https://github.com/anki/cozmo-python-sdk
- Edit your PATH variable to include /opt/platform-tools so you can access
the "adb" (Android Debug Bridge) utility. You can
do this by including the following line in your .bashrc file and then doing "source .bashrc":
$ export PATH=/opt/platform-tools:$PATH
- Connect the Kindle to the workstation via its USB cable.
- 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
- Run the Cozmo app, connect to the Cozmo, click on the gear icon
in the top right corner, scroll right, and select "Enter SDK Mode".
You should see a mostly black screen.
- Run the Hello World demo by doing:
$ cd ~/cozmo-python-sdk/examples/tutorials/01_basics
- Examine the source code of 01_hello_world.py.
- Try some of the other tutorials in the 01_basics directory.
- Try the Cozmo remote control app by doing:
$ cd ~/cozmo-python-sdk/examples/apps
IV. Introduction to Cozmo-Tools
- Add the cozmo-tools directory to your search path by putting
the following lines in your .bashrc and then doing "source .bashrc":
- Run the simple_cli command line interpreter by doing:
$ simple_cli VIEWER
- Try showing Cozmo its cubes and see how they are displayed in the
Tk viewer. Also try showing Cozmo a face.
dir(robot) to examine the fields of the variable
robot, and similarly for
- Run the world viewer by typing
the "h" key for world viewer keyboard command help.
- Let Cozmo watch one of his cubes as you move it around, and
observe how the display changes in the world viewer.
V. Animation Explorer
- Download and run the Animation Explorer by doing:
$ git clone https://github.com/GrinningHermit/Cozmo-Animation-Explorer
$ cd Cozmo-Animation-Explorer
- Try some of the animations. Look at Cozmo's face to see how his
expression changes during the animation.
VI. Clean Up
- Exit the Cozmo app.
- Put the robot, charger, USB cable, and light cubes back in the
cabinet and set them up so that they are charging.
- Log out of the workstation.