15-494/694 Cognitive Robotics Lab 10: Calypso for Cozmo
I. Setting Up Cloud Calypso
- You must use the Chrome browser for this lab. Go
to calypso-robotics.com. Allow access to your
camera and microphone.
- Create a free account, then log in.
- Swtich from Novice to Normal mode by clicking on the Home
icon in the top right corner of the screen, then clicking on
"Settings" and "Novice Mode".
- Click on the camera icon along the right edge of the screen to expose the camera viewer.
- Notice in the camera viewer that Calypso is doing face detection, and also emotion detection.
Try smiling, or opening your mouth to look surprised, and see how the display changes.
- Plug an Xbox controller into your laptop.
- Have a look at the Calypso curriculum.
This will come in handy later.
II. Writing Your First Calypso Program
- Use the controller to enter
the Let
Me Drive rule below. Note that controller button help appears
in the top left corner of the Calypso window. If you switch to
using the keyboard, the help switches to keyboard help.
WHEN gamepad DO move
- Run the program by pressing the "back" button on the Controller
or the Backspace key on the keyboard (Delete on the Mac), or clicking on the
green "play" button along the right edge of the screen.
- Use the controller to drive the robot around.
- Leave execution mode by pressing the Back button on the
controller or the Backspace key on the keyboard (Delete on the
Mac), or clicking on the red "stop" button at the right edge of
the rules pane.
- Add a
Pursue
and Consume idiom to your program using the following rules:
WHEN see red cube DO move toward it
WHEN bumped red cube DO grab it
WHEN DO say "I have a cube" and then...
WHEN DO switch to page 2
Note: to indent a rule, put the pencil on the WHEN tile, pick up
the rule using the A button, slide it to the right using the left
stick, then put it back down. Aternatively, you can click and drag on the
WHEN tile with the mouse.
- Run the program.
- Right click on a cube and change its color to red. See what happens.
- Stop the program.
- Click on the Home icon in the top right corner of the screen,
and save your program as MyFirstProgram.
III. Extending Your Program To A Second Page
- In the rule editor, go to page 2 by clicking on the page number
or arrows at the top of the screen. You should see a pink background
for this page.
- Enter the following rules:
WHEN see face happy DO say "You have a lovely smile"
WHEN got cube DO glow it none
WHEN DO drop
WHEN hear "Go again" DO switch to page 1
- Run the program, color one of the cubes red, and wait for the robot to pick it up.
- Smile for the camera to get the robot to drop the cube.
- Color another one of the cubes red.
- Tell the robot "go again" to get it go go back to page 1 and pick up the cube.
- Save your program.
IV. Calypso Map Layouts
Our first program used the default map layout, whichh as three cubes
and four custom markers. You can make your own map layouts with more
advanced features such as walls, rooms, and text.
- Click on the Home icon in the top right corner of the screen
and select New to begin a new program.
- Go to the Map Editor view by clicking on the map button on the
right edge of the screen, typing control-DownArrow.
- Drag Wall 39 from the palette onto the map layout.
- Drag three Wall-A items one at a time from the palette, click on an endpoint
to rotate them, and then drag them so that they snap together to form an enclosed "shack",
as in the diagram below.
- Drag a room from the palette onto the map layout and adjust it (drag the corners) to cover most of
the interior of the shack.
- Right click on the room and rename it to "shack".
- Drag the three cubes from the palette onto the map layout, as shown.

- Enter the following program. Note: to make the mini-page 1.1,
first create the rules for the mini-page, indent them, and then
right click on the first rule's "WHEN" tile and select "Make
mini-page". You do not type in the "PAGE 1.1" part. Click on the
WHEN tile of the second rule and drag it into the mini-page.
PAGE 1:
WHEN NOT-got cube DO
WHEN see cube NOT-in "shack" DO move toward it
WHEN bumped cube NOT-in "shack" DO grab it
PAGE 1.1
WHEN DO visit "shack"
WHEN visiting "shack" DO switch to page 2
PAGE 2:
WHEN scored red-score = 0 points DO move ahead 100-mm 50-mm 25-mm
WHEN DO switch to page 3
WHEN scored red-score = 1 points DO move ahead 100-mm 25-mm
WHEN DO switch to page 3
WHEN scored red-score = 2 points DO move ahead 50-mm
WHEN DO switch to page 3
PAGE 3:
WHEN DO drop
WHEN DO (game)+score red-score 1 point
WHEN DO switch to page 1
Page 1 of your program should look like this:

- Save your program, then run it.
V. Homework: Are You Smarter Than a Fifth Grader?
- Watch this video of the Cozmo baking companion for inspiration.
- Write your own Cozmo demo in Calypso. It should use a custom
map layout, multiple pages of code, plus some of the other
features you've learned today, such as speech recognition, facial
emotion detection, etc. For example, you might write a demo that
has the robot sort cubes by color, putting all the red cubes in
one room and all the blue cubes in another. Speaking to a cube
could cause it to change color.
- Take some photos and screenshots to document your demo.
Note 1: you can "tap" on a cube by left clicking on it while the
program is running. Cozmo can detect this via "WHEN feel cube". This
is another feature you could choose to use in your demo.
Note 2: besides programming Cozmo, you can also program the cubes with
their own rules. Click on the icon just below the Home icon to change
characters. For example, you might program a cube to change colors
every time the robot picked it up.
Hand In
Hand in the following in a file called handin.zip:
- Your Calypso program file.
- Screenshots of your Calypso world map when running your program, and a brief description of
what the program deos.
|