Fall2007BioInspiredRobotDesignAssignment3
| (10 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Robot Lab (Spring 2007)]] | [[Category:Robot Lab (Spring 2007)]] | ||
| + | === Assignment 3: Path Planning Basics=== | ||
| − | + | We will not be using Roombas in this first part; rather, we will simulate a point robot. You will write a program to calculate a path through an occupancy map using the Wavefront algorithm, a breadth first search. Once the path has been planned, this turns into a dead reckoning problem, which we have already seen, and since we know how temperamental dead reckoning is, this will introduce a wrinkle. We know with dead reckoning the path your robot takes is not exactly the path you specify, and over the course of the path your robot's error grows. If your robot hits an obstacle, this will throw off the path that you had told your robot to execute and your robot may not finish the course. Before creating the path, your program must first adapt the map so that your robot will not come close to any obstacle or any wall except for the start and end positions. Then you should calculate the possible paths in the map using the Wavefront algorithm, and finally calculate a best path for your robot given the Wavefront map. | |
| − | + | ||
| − | + | ||
| − | We will not be using Roombas in this | + | |
| − | + | ||
==== Updates ==== | ==== Updates ==== | ||
| − | + | * 2007-11-09: Here is the original map before it was scaled up [[Image:InitialMap.txt]] | |
*rows and columns were written backwards, the first number is columns, the second number is rows | *rows and columns were written backwards, the first number is columns, the second number is rows | ||
*All parts of the assignment should be done in your code, your code can be whatever language you like | *All parts of the assignment should be done in your code, your code can be whatever language you like | ||
| Line 15: | Line 12: | ||
*For lettering your path, rather than A-Z,AA-AZ you can just start over at A again. | *For lettering your path, rather than A-Z,AA-AZ you can just start over at A again. | ||
| − | ==== Description | + | ==== Description ==== |
| − | + | ||
Your program should take in a text file called path_input.txt which will look like: | Your program should take in a text file called path_input.txt which will look like: | ||
| Line 22: | Line 18: | ||
[[Media:Path input.txt]] | [[Media:Path input.txt]] | ||
| − | Note that this is an example input, which will be followed in the assignment. The actual input file will be provided below. | + | '''Note''' that this is an example input, which will be followed in the assignment. The actual input file will be provided below. |
The first line tells how many columns (9), the second line tells how many rows (8) the map has. The starting point for the path will have an S, and the ending point will have an E. All obstacles will have a 1, and open cells will have a 0. | The first line tells how many columns (9), the second line tells how many rows (8) the map has. The starting point for the path will have an S, and the ending point will have an E. All obstacles will have a 1, and open cells will have a 0. | ||
| Line 56: | Line 52: | ||
| − | You will be given the [[Media:A3_path_input.txt ]] file (and change the name to path_input.txt), and your code should execute on that input file, producing the two output files. | + | You will be given the <!--[[Media:A3_path_input.txt ]]--> [[Image:Hallway path input.txt]] file (and change the name to path_input.txt), and your code should execute on that input file, producing the two output files. |
| + | |||
| + | '''NOTE''' Each character in the input file represents a 3x3 inch square, so a 16 character square represents 1 tile in the floor. | ||
You should turn in: | You should turn in: | ||
*your code | *your code | ||
| − | * | + | *hallway_path_map.txt |
| − | * | + | *hallway_path_plan.txt |
| − | For gradudate students, you must implement the Wavefront algorithm in addition to one other path-planning algorithm that you find (other than a Random Walk). For some examples, see chapter 2 of Steven LaValle's Planning Algorithms book at http://planning.cs.uiuc.edu/. Please provide a short description of what other algorithm you choose and how it works. Graduate students must then turn in: | + | <!-- For gradudate students, you must implement the Wavefront algorithm in addition to one other path-planning algorithm that you find (other than a Random Walk). For some examples, see chapter 2 of Steven LaValle's Planning Algorithms book at http://planning.cs.uiuc.edu/. Please provide a short description of what other algorithm you choose and how it works. Graduate students must then turn in: |
*your code | *your code | ||
| Line 72: | Line 70: | ||
*the output file of your additional algorithm | *the output file of your additional algorithm | ||
*any other support files for your additional algorithm | *any other support files for your additional algorithm | ||
| − | *README file, containing a short description of your additional algorithm and how it works, and an explanation of what additional files you are turning in | + | *README file, containing a short description of your additional algorithm and how it works, and an explanation of what additional files you are turning in--> |
| + | |||
| + | === Assignment 3 Part B: Path Planning Execution=== | ||
| + | While you used simulated robots in the first part, you will use real robots in this section. In this section, you will be provided with an initial text file that represents part of the hallway on which you will perform path planning techniques you learned in the first section, but taking into account the challenges of executing the path with a real robot. | ||
| + | |||
| + | ==== Description ==== | ||
| + | |||
| + | *Perform path planning techniques from section A onto the provided text document of the hallway (below). Each character represents a forth of a foot. | ||
| + | |||
| + | *Take in account the diameter of the robot in the path planning. The path planning algorithms in part 1 may return paths that a point robot may travers, but not a real robot. For example, some paths might bring your robot through a 1 foot passage, but your robot's diameter is more than 1 foot. You might want iterate through potential paths returned by your path planning algorithm and discard ones that would not work for a real robot. | ||
| + | |||
| + | *Write code that would allow your robot to follow the calculated path. The robot will start facing any direction you please. | ||
| + | |||
| + | ==== Notes ==== | ||
| + | * The initial map (not expanded) can be found here: [[Image:InitialMap.txt]] | ||
| + | * This assignment should be included all in one program (ie your program should calculate a path, perform corrections on the path, and then move the robot without user assistance between stages). | ||
| + | |||
| + | ==== Deliverables ==== | ||
| + | |||
| + | |||
| + | *your code | ||
| + | *wavefront_path_map.txt | ||
| + | *wavefront_path_plan.txt | ||
Latest revision as of 16:35, 9 November 2007
Contents |
Assignment 3: Path Planning Basics
We will not be using Roombas in this first part; rather, we will simulate a point robot. You will write a program to calculate a path through an occupancy map using the Wavefront algorithm, a breadth first search. Once the path has been planned, this turns into a dead reckoning problem, which we have already seen, and since we know how temperamental dead reckoning is, this will introduce a wrinkle. We know with dead reckoning the path your robot takes is not exactly the path you specify, and over the course of the path your robot's error grows. If your robot hits an obstacle, this will throw off the path that you had told your robot to execute and your robot may not finish the course. Before creating the path, your program must first adapt the map so that your robot will not come close to any obstacle or any wall except for the start and end positions. Then you should calculate the possible paths in the map using the Wavefront algorithm, and finally calculate a best path for your robot given the Wavefront map.
Updates
- 2007-11-09: Here is the original map before it was scaled up File:InitialMap.txt
- rows and columns were written backwards, the first number is columns, the second number is rows
- All parts of the assignment should be done in your code, your code can be whatever language you like
- The number of rows and columns start from 1, so if rows = 9, then there are 9 rows
- For lettering your path, rather than A-Z,AA-AZ you can just start over at A again.
Description
Your program should take in a text file called path_input.txt which will look like:
Note that this is an example input, which will be followed in the assignment. The actual input file will be provided below.
The first line tells how many columns (9), the second line tells how many rows (8) the map has. The starting point for the path will have an S, and the ending point will have an E. All obstacles will have a 1, and open cells will have a 0.
We will assume that your robot can move one square at a time in any direction (up, down, left, right, all four diagonals), as long as it does not go off the map or into an occupied cell. We also assume that your robot takes up 1 cell. To provide your robot with a buffer so that it does not run into an obstacle or a wall given the error in its path, you will add extra occupied cells to the map. You should first increase the size of all obstacles by the size of your robot in all directions by adding a 1 in all directions around all obstacles.
You will not turn this step in, but here is a representation so that you can see what the input map would look like after your program expands the obstacles:
Next you will expand all walls by adding a 1 above the lower wall, to the right of the left wall, below the upper wall, and to the left of the right wall, do this for all cells that are not currently occupied and are not the start and end positions (i.e. for any cell that has a 0).
You will not turn this step in, but here is a representation so that you can see what the input map would look like after your program expands the walls:
Now we perform the Wavefront algorithm. This is a breadth first search that starts at the end position, and expands out from there, noting how far every other cell is from the end position. You should replace the E (end position) with a 2, then until your algorithm encounters the S (but will not replace the S), you will expand out in a wave from the end position, setting all adjacent cells to 3, then the adjacent cells of the 3's to 4, etc.
You will turn this step in, so your program should output a file named wavefront_path_map.txt that looks like the following:
Finally you will calculate the shortest path from the S to the 2. Note that this minimal distance path may not be unique. Your path will replace the S with an A, then increment through alphabet (B..Z, then AA, AB, AC..AZ if needed) with one letter per cell to indicate your path. Since some environments don't allow more than one character in a position, you may start your path over at A, i.e. A-Z, then A-Z again.
You will turn this step in, so your program should output a file named wavefront_path_plan.txt that looks like the following:
Note that there is an alternative path with F the cell below the displayed F, and then another choice for G, as all of these paths will have the same length.
Deliverables
You will be given the File:Hallway path input.txt file (and change the name to path_input.txt), and your code should execute on that input file, producing the two output files.
NOTE Each character in the input file represents a 3x3 inch square, so a 16 character square represents 1 tile in the floor.
You should turn in:
- your code
- hallway_path_map.txt
- hallway_path_plan.txt
Assignment 3 Part B: Path Planning Execution
While you used simulated robots in the first part, you will use real robots in this section. In this section, you will be provided with an initial text file that represents part of the hallway on which you will perform path planning techniques you learned in the first section, but taking into account the challenges of executing the path with a real robot.
Description
- Perform path planning techniques from section A onto the provided text document of the hallway (below). Each character represents a forth of a foot.
- Take in account the diameter of the robot in the path planning. The path planning algorithms in part 1 may return paths that a point robot may travers, but not a real robot. For example, some paths might bring your robot through a 1 foot passage, but your robot's diameter is more than 1 foot. You might want iterate through potential paths returned by your path planning algorithm and discard ones that would not work for a real robot.
- Write code that would allow your robot to follow the calculated path. The robot will start facing any direction you please.
Notes
- The initial map (not expanded) can be found here: File:InitialMap.txt
- This assignment should be included all in one program (ie your program should calculate a path, perform corrections on the path, and then move the robot without user assistance between stages).
Deliverables
- your code
- wavefront_path_map.txt
- wavefront_path_plan.txt