15-494/694 Cognitive Robotics Lab 10:

I. Software Update, SDK Update, and Initial Setup

  1. If you are running on your personal laptop you will need to update your copy of the cozmo-tools package and the Cozmo SDK. (The REL workstation copies are kept updated by course staff.) To apply these updates, assuming you put the cozmo-tools package in /opt, do this:
    $ cd /opt/cozmo-tools
    $ sudo git pull
    $ sudo pip3 install --upgrade cozmo
  2. For this lab you will need a robot, a charger, a Kindle, cubes, a forklift attachment, and some chips.
  3. Log in to the workstation.
  4. Make a lab10 directory.

II. Cube Manipulation

We now have state nodes for PickUpObject, PlaceOnObject, and PlaceObjectOnGroundHere. Write a program that allows you to tap on a cube to tell Cozmo to pick it up, and then tap on another cube to tell Cozmo to place the cube it's holding on top of that one.

You can use the =Tap=> transition to detect tap events. Note that Cozmo must know where the cubes are in order to manipulate them, so assume the cubes will be in view when the program is started.

III. Capturing and Moving Chips Around

. We can use OpenCV's contour detector to recognize chips, as shown in class. We can use the forklift attachment to capture and push a chip.

Write code to detect a chip at least 4 inches away from the robot and not straight ahead. Once a chip is detected, your program should drive so as to capture the chip in the forklift, then push it along a 180 degree arc with a radius of 6 inches. You will want to use the DriveArc node for the arc.

Hand In

Hand in the code you wrote in parts II and III.

Dave Touretzky
Last modified: Fri Mar 31 05:15:38 EDT 2017