In this lab you will explore Mirage worlds and the particle filter in more detail.
Part I: Making A Mirage World
- Copy the file pushbox.ian into your
~/project/worlds directory. Look through this file for examples of the
syntax for defining Mirage worlds.
- See the Mirage
WorldBuilder syntax page for an explanation of the syntax, and how
to generate a Mirage world from an ian file. Also see the Mirage Tips
page for more explanation of Mirage features.
- Run the WorldBuilder on pushbox.ian to produce a pushbox.mirage file.
(You should be in your project/worlds directory when you do this.)
- Run Mirage on your pushbox.mirage file, and run the Calliope5KP
robot around in your world. Try bumping into movable and immovable
objects to see what happens.
Part II: Fun With the Particle Filter
-
This exercise will test the particle filter's ability to deal with
ambiguity (multi-modal distributions) in a Mirage world, similar to
the example shown in lecture. 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.)
-
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. And they should be far enough away from the
first set so that their associated particle distributions don't
overlap.
-
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 to see how to use the
PilotDemo's buildMap() method to set up a map. Model the navigation
markers as ellipse shapes, and set their coordinates to reflect their
locations in the Mirage world you created.
-
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.
- 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.
- Look at the particles after the robot has moved. Where are they
now? Take a screenshot.
- Do another localization step. What does the distribution look
like after this step? Take a screenshot.
Hand In
Hand in the items listed above by Friday, March 29.
|