TagCourse Maze

From Tekkotsu Wiki

Jump to: navigation, search

The TagCourse maze is a robot course defined by a series of AprilTag pairs.

The TagCourse maze in Mirage.
A pair of tags in a physical TagCourse maze.

One tag in each pair designates a forward travel distance: either 1000 or 2000 millimeters. The second tag designates a left turn, a right turn, or a halt action. Following the instructions given by a tag pair will position the robot to read the next tag pair.

Tag ID Instruction
0Forward 1000 mm
1Forward 2000 mm
2Turn left 90 degrees
3Turn right 90 degrees
4Halt

The path traced by the robot is shown in the figure.

Path indicated by the tags in the TagCourse maze.

TagCourse Demo

This world is available in Mirage at /usr/local/Tekkotsu/tools/mirage/worlds/TagCourse.mirage

There is also a TagCourse demo that takes the robot through the course. You can run the demo from the ControllerGUI by going to Root Control > Framework Demos > Navigation Demos > TagCourse

The source code is in /usr/local/Tekkotsu/Behaviors/Demos/Navigation/TagCourse.cc.fsm

The demo is discussed in Lab: The Pilot and Odometry.

Maze Construction

You can make a physical tag course by printing out AprilTags and taping them to cardboard boxes, as in the photo at right.

  • You can print out a set of instruction tags here.
  • Tag centers should be 6 inches above the floor for the robot to see them well.
  • In the Mirage version, the tags are 7x7 inches, with a 20 mm gap between them.
  • Boxes should be offset so the robot doesn't run into them. For example, if the first step is to go forward 2000 mm, the first box should be placed about 10 inches beyond that because the Create robot has a 6 inch radius and we should leave roughly 4 inches of clearance between the robot and the box.

The maze setup uses five boxes:

Box 1: forward 2000, left 90
Box 2: forward 1000, left 90
Box 3: forward 1000, left 90
Box 4: forward 2000, right 90
Box 5: forward 1000, halt