15-494 Cognitive Robotics
Spring 2011
Course Links:  Main Lectures Labs Homeworks

Tekkotsu Links:   Wiki Tutorial Resources Bugs CVS
Reference:

Cognitive Robotics: Lab 4


Part I: MapBuilder Demo

First, make sure your project/ms/config/tekkogsu.xml file is set up to use defaul.tm and default.col for color segmentation. Since all three of these files may have been changed by previous users of the robot, you should install fresh copies from your config directory into the robot's /home/student/project/ms/config directory. Or for a quick and dirty fix, just delete project/ms on the robot and then do a "cvs update" (also on the robot) to restore the directory from the cvs respository.

Download LocalMapDemo.cc.fsm. Compile it and do sendtekkotsu (or sendmycode if you've already done a sendtekkotsu today.)

Make a tic-tac-toe board like the ones shown below. You can use any color scheme you want. Adjust the code in LocalMapDemo.cc.fsm to match your choice of line and ellipse colors.

Turn on the RawCam and SegCam viewers so you can see what the robot is looking at. Position the robot about a foot away from the tic-tac-toe board.

Run LocalMapDemo on the robot to construct a map of the board. To see the local map, you will need to click on the "L" button in the ControllerGUI instead of the "C" button. Hand in an image file containing the map you constructed.

Part II: MapBuilder in the Simulator

lab4.png Download lab4.png and lab4.pos your project/logged directory, Make sure there are no other .jpg, .png, or .pos files in that directory. (If you have other files there, move them someplace else.)

Write a new behavior CamMapDemo that invokes the MapBuilder to process the image in camera space. Since we only wish to process a single image, we don't want the map builder to move the head, and we don't need to project the shapes to local space, use cameraMap instead of localMap.

Notice how the map builder handles occlusion of lines by game pieces. Hand in an image file showing the shapes you get in camera space.

Part III: Parsing the Tic-Tac-Toe Board

If time permits, start on Homework 4, parsing the tic-tac-toe board.


Dave Touretzky and Ethan Tira-Thompson