Lab 2

Lab 2: Introduction to Cozmo

This lab will explore the basic sensing and actuation capabilities of the Cozmo robot.

1. At the end of Lab 1 you were able to modify and run the "hello world" Python program (01_basics/01_hello_world.py) that made the Cozmo say something. Next, you will run a number of other existing example programs, inspect the code to understand how it works, and modify the code to explore and better understand the robot's capabilities. We recommend going through all of the examples if you would like to refresh your Python skills, but you can also skip to the following ones. Note that you might need to install additional Python or Cosmo libraries along the way.

    • 04_drive_square.py: Mark the initial pose of the robot and test if the robot does indeed come back to the same pose. Then modify the speed (faster/slower) and see if that changes anything. Finally, try going the same distance with multiple commands (e.g. three 30degree turns instead of one 90degree turn) and see if that changes anything.
    • 05_motors.py: Explore different values of each parameter for each actuator.
    • 06_sing_scales.py: Compose your own tune.
    • 07_backpack_lights.py: Create your own light pattern (e.g. French flag).
    • 08_animation.py: Use your web search skills to discover and play at least one more animation.
    • 09_cube_lights: Can you get the lights to flash?

2. Next you will get a better sense of the robot's camera and built in computer vision capabilities, by running and inspecting the sample programs under the 03_vision/ folder, specifically:

    • 02_face_follower.py
    • 03_annotate.py
    • 04_exposure.py

You can use the last one to choose good fixed camera settings (exposure and gain) given the current lighting conditions, which will be useful for the next lab.