DescriptionIn this activity, students construct a shack for Cozmo to play in, and program him to visit various regions in and around the shack. Learning GoalsThis activity teaches students about landmark-based navigation and path planning. The markers on the walls serve as landmarks. The walls and light cubes are obstacles that Cozmo must find his way around using his built-in path planning algorithm. He can plan paths that go through doorways, using the marker above each doorway to fine tune his motion. PreparationEach team of students needs a cardboard box at least 11x11x6.5 inches. They will also need wall templates provided in the files Wall39.pdf and Wall45.pdf. There are two pages per file; they must be printed single-sided.Students should be instructed on the proper handling of box cutters. A "safety" box cutter with enclosed blade is recommended. For younger students, it may be preferable for the teacher to do the cutting. A scissors can be used, with some difficulty, in place of a box cutter.
Construction Steps (Click on Images to Enlarge)Here is a shack decorated as a grocery mart, by Shanshan Jin of ReadyAI:
Map LayoutWalls serve as landmarks that allow Cozmo to accurately determine his location on the world map. Since rooms are defined in world map coordinates, having walls present ensures that rooms can be accurately located even though the rooms themselves have no visible markings.
ProgrammingYou can use the "visit" action to visit a room. The "visiting" predicate is true whenever the robot's location falls within a room.To visit each of the three rooms we defined above, use a state machine with three pages. Here is the what the code should look like. |