Computer Science 221: Assignment #05

Spring 2007

Department of Informatics

Donald Bren School of Information and Computer Sciences

University of California, Irvine

Home | Administrative Policies | Course Structure | Materials | Assignment Schedule | FAQ

 

The goal of this project is to implement a particle filter (Monte Carlo Recursive Bayesian Network Solver) to solve the robot localization problem

  1. Download a map of the environment (an office building)
    1. Map in bmp format: here.
  2. Download the observation data
    1. Located here.
    2. The main reason why this is an extra credit assignment is because I ran out of time to figure out the format of the observation file. It is mostly obvious, but there are some orientation issues that aren't clear.
    3. All of this data comes from RADISH if that helps at all. In particular this data is from freiburg.
  3. Write code
    1. Write code to load the map image into an occupancy grid.
      1. An occupancy grid is a 2-D array that has a number from 0.0 to 1.0 indicating the probability that there is an obstruction in the location which is represented by that grid cell. Basically a grayscale bitmap.
      2. For example, a 10m by 10m room which is divided into 20 cells on each side would become an array with 400 elements in it. Each element would be a probability that there is an obstruction in the .5m by .5m cell represented by an entry in the array.
      3. The image above has 5 cm x 5 cm cells.
    2. Write a function which returns the distance to a wall:
      1. float scanDistance(map,x,y,theta);
      2. to do this you have to orient the map and the theta.
        1. I used postive y to be up in the bitmapped image.
        2. I used positive x to be right in the bitmapped image.
        3. I used 0 degrees to be north/up, 90 degrees to be east/right.
    3. Write a sensor model which uses the scanDistance function
      1. float sensorModel(x,y,theta, map, list of scans)
        1. This function takes a position, map and list of scans and returns a number from 0.0-1.0 indicating the probability that this list of scans could be generate with this pose (x,y,theta).
        2. You could do this by calculating the probability of each individual scan and multiplying them together.
        3. The probability of each individual scan could be a gaussian with a mean given by "scanDistance"
    4. Write a motion model which given a position and an estimated motion returns a new position
      1. (x,y,t) motionModel(x,y,t,dx,dy,dt)
        1. This would simple be adding if dx, and dy weren't estimates. So instead of adding, this should return a randomly generated new pose (x,y,theta) which is "close" to (x+dx, y+dy,t+dt). I don't know the real error parameters of the robot so you'll have to guess here as to what form "random" takes. (gaussian?)
    5. Write a class/object/data structure which represents the state (aka a particle)
      1. A state is a robot's pose (x,y,theta) and the particle's weight.
    6. Write a function that visualizes the current probability distribution
      1. Displays the map and overlays the collection of particles.
  4. Put it all together
      1. Generate a collection of particles randomly.
      2. Loop Forever
        1. Visualize the state
        2. Get all the new ODOM (odometry) observations up to the next LASER observation
          1. Combine them into one odometry observation
        3. Move your particles, using your motion model and the combined odometry observation.
        4. Get a new LASER observation
        5. Reweight all your recently moved particles using the sensor model and the LASER observation
        6. Resample with replacement the particles to create a new particle set based on the weights after the LASER observation.
  5. Capture a sequence of still frames. Combine them into an animation. Turn the animation into Don with any necessary explanation. (djp3@ics.uci.edu).