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

Tekkotsu Links:   Tutorial Resources Wiki Bugs CVS
Reference:

Cognitive Robotics: Lab 6


Software Update

We've made an upgrade to the Tekkotsu system that requires you to make some changes to your directory. Follow these easy steps:
cd ~/project
rm Startup*
cvs update -dP
Next, edit the file UserBehaviors.h. Delete the line beginning "<<<<<<", and then delete everything from the "=====" line to the line beginning ">>>>>>". You'll have to do this in both Part 1 and Part 2 of the Userbehaviors.h file. Also delete the references to HelloWorldBehavior in part 1 and part 2. Once you've completed these edits, type "make" to rebuild.

From now on, your code should be written as MyCoolThing.cc.fsm instead of MyCoolThing.h.fsm. You will no longer add anything to UserBehaviors.h. Instead, at the end of MyCoolThing.cc.fsm add the following line:
REGISTER_BEHAVIOR(MyCoolThing);
The advantage of this new scheme is that all your behaviors compile as individual .cc files, so editing one won't cause the Makefile to recompile everything. So compiles will be faster. Also, model-specific behaviors can test the target model right in the source file, instead of forcing the user to include those tests in the UserBehaviors.h file.

Part I: Localization With the Particle Filter

In this part of the lab you will create a world map, then move the robot to another location, build a local map, and use the particle filter to estimate where the robot is on the world map.

Start with the file Lab6a.cc.fsm. Arrange three plastic easter egg halves in an L-shape, with adjacent easter eggs about 100 mm apart. Use at least two different colors. Be sure to do "gettekkotsu" at the start of the lab so you are using the current versin of libtekkotsu.so. Compile and run the Lab6a behavior and observe the robot performing a visual search for the landmarks. Examine the world map to see what the MapBuilder found.

Move the robot to a slightly different location. Then type !msg foo in the ControllerGUI's Send Input window to tell the behavior to continue. The robot will look around again, constructing a new local map, and then call the particle filter to localize the robot on the world map. Refresh the world map to see what the particle filter concluded about the robot's position.

Hand in: snapshots of your local map and the corresponding world map. You can use the "Save Image" button in the SketchGUI to save a picture of the local map or world map.

Part II: 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.

Part III: Find and Knock Down A Green Pillar

The Pilot can be used to search for an object by performing a map building operation. If the desired object isn't found, the Pilot can rotate the body and try again. Since the Pilot doesn't know what we're searching for, we must supply an exitTest() function to tell it when to stop searching. In this exercise we're going to look around for green blobs, and then try to run over the biggest one.

Compile the file Lab6b.cc.fsm. Use an upright green soda bottle as your search target. Try starting the Chiara close to and facing the target, and see how well it can do at knocking it over. Then try starting the robot from further away from the target, and see if it can find it.


Dave Touretzky and Ethan Tira-Thompson