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

Tekkotsu Links:   Wiki Tutorial Resources Bugs CVS
Reference:

Cognitive Robotics: Lab 8 & Homework 7


In this lab you will explore the particle filter and path planner in more detail.

Part I: Fun With the Particle Filter

  1. This lab will test the particle filter's ability to deal with ambiguity (multi-modal distributions) in a Mirage world. Create a navigation marker consisting of two half-spheres 600 mm apart, 1000 mm in front of the robot. Make them two different colors. At these distances, both should be easily visible in the camera image. (Note: you can make half-spheres by setting the z coordinate to 0 so that the spheres are half embedded in the floor.)
  2. Make a second set of navigation markers identical to the first, but put them somewhere else in the world so they're not visible in the initial camera image. They should also have a different orientation, so if the first set are aligned east-west, the second set should be aligned north-south.
  3. Create a behavior that is a subclass of PilotDemo and includes your two sets of navigation markers in its world map. Look at the PushBox1 demo in Part II of this lab to see how to use the PilotDemo's buildMap() method to set up a map. Model the navigation markers as ellipses.
  4. Your behavior should use particleFilter->resetFilter(); to randomize the particles, then use the Pilot's localize operation. You should see two clusters of particles, one in front of each navigation marker. Take a screenshot. Note that you must tell the Pilot what landmarks to use for localization by filling in the landmarks field of the pilot request. You must also give it a MapBuilderRequest object in the landmarkExtractor field, and fill in that request so it knows to look for ellipses of the proper colors.
  5. Write code to move the robot from its initial position to a position where only the second navigation marker is visible. You'll want to control when this happens, so use a =TM("go")=> transition.
  6. Look at the particles after the robot has moved. Where are they now? Take a screenshot.
  7. Do another localization step. What does the distribution look like after this step? Take a screenshot.
  8. Hand in your code, your Mirage world, and your three screenshots.

Part II: Pushing Objects With the Pilot demo

  1. Do this assingment in Mirage using the CREATE (not CALLIOPE5KP) robot with the paddles you created. First do a "cvs update mirage.plist" in your project directory in order to fix a Mirage parameter setting that affects the accuracy of motion of your robot.
  2. Compile and run the PushBox1 behavior in the pushbox world and look in the world shape space to see the plans produced by the Pilot for acquiring and pushing the box.
  3. Examine the pushcanisters world in Mirage. You will note that there are movable red canisters, and immovable green obstacles. Also, the green obstacles aren't segmented very well. Fix this by adding additional light sources to the Mirage world so that the obstacles are better illuminated. (Use the light command in the ian file to add light sources.)
  4. Write code to push all the red canisters into the blue square by using the Pilot's pushObject request as demonstrated in PushBox1. You can represent the blue square by a polygon in world space using the code below.
    $nodeclass PushCanisters : PilotDemo {
      virtual void buildMap() {
        std::vector boxpts;
        float boxSide = 750;  // millimeters
        float offset = 500 + boxSide/2;
        boxpts.push_back(Point(offset-boxSide/2, boxSide/2,0,allocentric));
        boxpts.push_back(Point(offset+boxSide/2, boxSide/2,0,allocentric));
        boxpts.push_back(Point(offset+boxSide/2,-boxSide/2,0,allocentric));
        boxpts.push_back(Point(offset-boxSide/2,-boxSide/2,0,allocentric));
        NEW_SHAPE(box, PolygonData, new PolygonData(worldShS, boxpts, true));
        box->setColor("blue");
        box->setObstacle("false");
      }
    
      ...
    }
    
  5. Hand your code, your modified world, a movie showing your robot pushing all the canisters into the square, and a screen shot of world shape space showing some of the path planning.

Hand In

Hand in the items listed above by Friday, March 30.


Dave Touretzky and Ethan Tira-Thompson