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

Tekkotsu Links:   Wiki Tutorial Resources Bugs CVS
Reference:

Cognitive Robotics: Lab 6


Part I: AprilTags and Maze Construction

This part is a group exercise; you are encouraged to collaborate. Start by measuring the dimensions of the maze and constructing a diagram like the one below. (This diagram is for a different maze, so the numbers won't match your measurements.)



Tape AprilTags to the interior walls of the maze following the pattern in the diagram. The digits indicate which tag ID to use in each position. Note: when you tape a tag to the maze wall, the center of the tag must be exactly 7 inches (177.8 mm) above the floor of the maze. Assuming the bottom left corner of the maze is at (0,0), measure the coordinates of each AprilTag.

Place a Chiara in the maze and use the AprilTest demo (Root Control > Framework Demos > Vision Demos > AprilTest) to detect some AprilTags. (Be sure to do sendtekkotsu first, as Tekkotsu has changed recently.) Make sure the estimated distance to the tags is reasonably correct. Note: the robot must be standing, not lying on its belly, in order for distance estimation to work properly. Use the Walk Controller to get the robot to stand. Use the Relax Behavior to place the robot back on its belly once you have taken your measurements, so the servos don't overheat.

Part II: Describing the Maze

This part you should do individually. Run the the Emaze demo (Root Control > Framework Demos > Navigation > Emaze), examine the map in worldShS, and look at the code in Tekkotsu/Behaviors/Demos/Navigation/Emaze.cc.fsm to see how the coordinate system works. Notice that in the worldShS coordinate system, x is vertical distance and y is distance to the left.

Create the file Playpen.cc.fsm that describes your robot playpen, following the Emaze example.. Make the bottom left corner of the maze have coordinates (-500mm, 500mm). The reason for doing this is so that when you build the maze in Mirage and the robot materializes at location (0,0), it doesn't end up embedded in a wall.

Hand in: Playpen.cc.fsm today; do the rest of the lab for homework.

Part III: Navigating in the Maze

Download and run the file Lab6Demo.cc.fsm using Mirage with the Emaze world. Following this example, modify your Playpen.cc.fsm to navigate to the middle alcove of the playpen. Run your code on the actual robot. If you would like to run in Mirage, you can modify your Playpen.cc.fsm file to use the Emaze coordinates.

Hand in: your modified Playpen.cc.fsm, and a screenshot of the world map showing the planned path.

Part IV: Exploring the Walk Parameters

In this section we will experiment with the parameters controlling the Chiara's walk engine. Place the robot on the floor for this exercise. Instead of using the Walk Remote Control, go to Root Control > File Access > XWalk Edit. When the robot stands up, its initial leg placement is not very good, and this will eventually cause servos to overheat unless you move the robot to a more comfortable position.. To do this, have the robot walk forward a few steps. Then try the following exercises:
  1. Looming: in the walk editor, set the OffsetX parameter to 30. Then set it to -30. Then set it back to 0.

  2. Swaying: set the OffsetY parameter to 30. Then set it to -30. Then set it back to 0.

  3. Twisting: set the OffsetA parameter to 0.20. Then set it to -0.20. Then set it back to 0.

  4. Walking tall: select the GroundPlane entry. While gently holding the robot in case of disaster, change the last parameter value from -10 to -130. Have the robot walk forward very slowly for a few steps. Then change the parameter back to -10.

Exploring gaits
  1. The default gait moves one leg at a time. Have the robot walk forward and record the order in which it moves its legs, e.g., LFr-RFr-LBk-etc.

  2. In the XWalk Editor, click on "Load", then choose the file xwalk2.plist. This loads a two-at-a-time gait. Walk forward and record the order in which the robot moves its legs.

  3. Load the parameter file xwalk3.plist. Walk forward again and record the order in which the robot moves its legs.

Hand in: The leg orders for xwalk, xwalk2, and xwalk3.


Dave Touretzky and Ethan Tira-Thompson