Localization / Final Project Planning
The purpose of this project is to add a localization capability to your robot given a map. You will build a map using the laser on one of the Magellans, then write a particle filter localization routine to identify the robot's location on the map as it wanders around.
Tasks
-
Build a map of an area of the first floor of Davis. The map
does not need to be large. You can use the section of the lab
between the couch, the door, and the wall, or you can do the
faculty office corridor, or you can get more ambitious. As
demonstrated in lab, use thecapture program in the
hokuyo subdirectory to take data. The steps are:
- Set up the robot for joystick control. Use the robot console to select joystick control, then make sure both of the small panels on the right are reading 1. You have to hold down the leftmost button on the joystick in order for it to work. Drive the robot slowly. Practice a little before you start.
- When you are ready, stand behind the robot and start the capture program. Then drive the robot around the area you want to map. Move the robot slowly, especially during turns.
- When you are finished driving the robot around, type q to terminate the capture program. The map will be saved in a file called laser.dat. Rename the file and move it to your directory.
- Copy the file over to the turtebot laptop in the lab. In the robot subdirectory, there is a README file. Follow the instructions in it to make the map from the laser.dat file. The end result should be a pgm. You probably want to carefully crop the pgm file when you are done and fix the values in the associated .yaml file.
-
Write a particle filter to do robot localization. Do not bother
trying to make the PF general-purpose (that is an extension).
It will be faster and easier to make it just for robot
localization. The following .c file may help you
get started. It includes a simple set of map functions that read
in a pgm file based on the ppmIO.c code (also provided). (Note
that the map_read does not read the associated .yaml file, but
that the map parameters of grid size and origin are hard-coded.)
I strongly recommend unit-testing each piece of your particle filter as you build it. Note that you can simulate laser readings use the calcExpected function.
- Create some type of visualization of the particles on the map. Show your particle system working. Note that you can use the jump function in the Mage library to correct the robot's location estimate.
- You should also spend time in this project planning your final project. Develop an idea, a plan, and a team, and talk with the professor about it.
Extensions
- Make your particle filter general-purpose.
- Do more than one map, or make your map bigger and more comprehensive.
- Do comparative testing with different numbers of laser samples, sensor models, grid sizes, etc.
Writeup
Label your project wiki page with the label cs363s17project6
Spring 2017