FourCorners Demo

From Tekkotsu Wiki

Jump to: navigation, search

The FourCorners demo shows how to use several bicolor markers for localization within a square.

Robot type: Any mobile platform

Where to find the demo: Root Control > Framework Demos > Navigation Demos > FourCorners

Source code: Tekkotsu/Behaviors/Demos/Navigation/FourCorners.cc.fsm

Setup Instructions

You will need four bicolor markers placed at the corners of a 3x3 foot square. The landmark colors are:

Position Top Color Bottom Color
NW orange green
SW pink blue
NE blue orange
SE green pink

Use a yardstick to measure the distances between landmarks, making sure that they are 36 inches apart.

Next you need to adjust the ASUS camera angle so that the robot can judge distance accurately. Position the robot in front of a landmark so that the distance from the webcam to the landmark is 500 millimeters (19.5 inches). Use the LookForBiColorMarkers Demo to measure the distance to the marker, and adjust the tilt of the ASUS screen until the x coordinate of the marker is roughly 500.

Running the Demo

Start the demo, and open the World sketchGUI window by clicking on the sketch "W" button in the ControllerGUI. You should see a display like the one below. The blue triangle is the robot. Bicolor markers are indicated by the color of the top segment, e.g., the orange and pink marker is shown as an orange icon.

Image:FourCorners-worldmap.png

Note: Create users should not use the Walk Remote Control with this demo, due to the Create Odometry Bug. Use the keyboard commands instead.

The keyboard commands may be typed in the ControllerGUI message window as !msg <command>, or typed on the Tekkotsu console by omitting the exclamation point:

f = forward 100 millimeters
b = backward 100 millimeters
l = left turn 30 degrees
r = right turn 30 degrees
v = vision update (force landmark processing now)
a = autonomous mode: robot travels on its own from landmark to landmark
q = quit from autonomous mode