Project 4: Path Planning and Navigation


Project Description  

In this assignment, you will write a path planner that uses wavefront propagation, and integrate the planner with the "avoid obstacles" and "go to waypoint" behaviors that you have already developed in your previous assignments. The result will be a hybrid architecture, which has a higher level path planner, combined with lower-level motor schemas for avoiding obstacles and going to a waypoint. The structure of your robot software should be as shown in the figure below.

(Note: Player includes a Planner proxy. However, the purpose of this assignment is for you to gain experience writing your own planning software. So, you are not allowed to copy or make use of the existing planner proxy software. Instead, you must write your own wavefront planner using the algorithms outlined in class.)

You should reuse your general hierarchical organization from project 2, but with some changes, such as:


Here are some details of implementation.

Inputting the map. For the path planner to function correctly, it needs to load the map of the environment into memory. For this assignment, we'll use the "hospital_section" map. At present, we have a bitmap version of this map in PNG format. However this format makes use of data compression, and isn't the easiest for you to read in directly into memory for the purposes of this assignment. So, we'll convert the bitmap to another format. There are several choices. We'll choose the PNM format. There is also a file(inputMap.cc) you can use to read in the map into a 2-D binary occupancy grid array, in which 0's represent free space and 1's represent obstacles. Note that you will still use the PNG format for Stage display purposes; this PNM format is just for your code to have access to the map for planning purposes. For more information on processing the map file, please read some extra notes here.

Growing the map for obstacles. You need to write a function that grows the obstacles in the grid map, so that your path planner can represent the robot as a point. This obstacle growth function must input a parameter representing the amount of growth desired, in units of the number of grid cells. Note that you will find there is a tradeoff between growing the obstacles too much and growing them too little. If you grow them too much, your path planner may not be able to plan a path to a reachable goal. If you grow them too little, the robot may come too close to obstacles. Please discuss this in your report.

Wavefront path planner. Once you have your map in memory, and have grown the obstacles, you are ready to implement the path planner. Your path planner must use the wavefront path planning algorithm we covered in class. You should start your wave propagation from the goal location, back to the start. (Later, after you get the single wave propagation working, you are welcome to implement a dual wavefront planner. However, this is not required.)

Once you generate a path, you'll need to smooth it using the approach described in class. The grid cells that remain on the robot path become waypoints. The output of your wavefront path planner should be the series of waypoints to be reached by the robot.

Note that if your path planner is given an unreachable goal position, it should state this fact and gracefully exit. A goal position could be unreachable because it is inside an obstacle, or it could be behind a wall, with no access. Your code should be smart enough to recognize this, and let the user know.

A note on doorways. A very tricky aspect of robot navigation in indoor environments is enabling the robot to move through doorways. You don't have a lot of room for error, and if your obstacle avoider is too sensitive, the robot may not be able to go through doorways, even though the robot should easily fit through the passage. This will be a tricky aspect of tuning your code so that the robot can follow the path generated by the path planner. Your code should work for any passage that is at least twice the width of the robot. Smaller passages may not work; you won't be penalized for that.


Setting up everything. In this exercise, you must use the bitmap called "hospital_section.png".

Your robot should be set up as it was in Project 2, with the same starting pose: [-10.071 3.186 0 -722.333].

Testing your code: Your path planner should work for any goal position given; in the case of unreachable goal positions, as previously stated, your planner should recognize this and gracefully exit. Test your code for lots of different goal positions. Then, create screendumps of your robot's path to the following specific goal positions (with the trace shown): (7.5, 5.5), (8.5, -4.0), (-18.5, 7), (-9, -4).

Project report (yourname-hw4.pdf) should include:

  1. A discussion of issues you ran into in getting your robot's behavior to work properly, particularly, when robot moves through doorways. Another issue you may run into is the obstacle avoidance behavior knocking the robot off its path, and then the robot having difficulty picking back up the path. If so, please discuss how you handled this issue. Finally, a discussion on the set up of your grid map, such as obstacle growth, etc.

  2. Path planner result: For each goal position, you should document the final series of waypoints that are generated by your path planner. To represent them on the hospital_section map, you can use the functions in the inputMap.cc to mark the waypoints on the map and include them in your report.

  3. 4 screendumps of your robot moving along the 4 goal points mentioned above. Be sure to turn on the robot trace. You just need to include the screendumps inside your project report, there's no need to include the images separately in your submission.


What to include to your submission?

Please put all your files in a single directory and zip it before you send them. Please name your directory and zip file name with your names and project number (for example, I will name my submission "daisytang-p4.zip".). Your submission should include:


Last updated: Feb. 2017