CMSC 172 - Project 1
CMSC 172-Robot Modeling
Laboratory Project 1
Objectives
1. To write a solution to the gross motion path-finding problem in 2D space;
2. To initially write a solution for the above problem restricting only the mobile part to move in two translational dimensions.
3. To extend the code for the second objective above to include the third rotational dimension.
Prerequisites
1. Knowledge in C or Perl or Java programming.
2. Knowledge in scripting documents via the Hypertext Markup Language (HTML).
Required Output
You must publish a web page that will show the code specified in the objectives. The web page must be named ~your_login/www/cmsc/172/proj1.html. It must show your name, the specifics of your solutions and a link to the source code. All of your source codes must be properly documented. If you used multiple files for the source code, you must also provide a link for these. A Missing section must be included if not all requirements are satisfied explaining why you failed to finish the project. All reasons must be technical!
The input to your program must be a filename (or if you want to a form in your HTML code if you want to write a CGI-Perl for this) that follows the following format (each item is a line in your input file):
* Number of vertices for your environment
* The coordinates of the environment's vertices in x y format. Notice the space in between the x- and y-coordinates. Each coordinate must be written on each line and in the neighborhood sequence. Meaning, if vertex B is both adjacent to vertices A and C, then the coordinates for A should be above the coordinates of B while that of C is below of B.
* Number of vertices for the mobile part
* The coordinates of the mobile part's vertices on each line with the same format as writing coordinates above.
* The coordinates of the center of the mobile part at its original position.
* The coordinates of the center of the mobile part at its final destination.
* The number of obstacles
* For each obstacle i, do the following:
o The number of vertices for the ith obstacle
o The coordinates of the ith obstacle's vertices on different lines with the same format as writing coordinates above.
* A comment for each line must be preceded by a the hash symbol (#) but must be written after the data.
The output of the program must be a series of coordinates that the center of the mobile part will have to go to from the original position to the final destination. The solution must be the shortest path. If there is no solution found, the output must be the message No solution was found.
Example
Input File
4 # the environment is a rectangle
0 0
15 0
15 10
0 10
4 # the mobile part is a 4-gon
0 0
4 0
4 2
0 2
2 1 # original position of mobile part
13 9 # target position of the mobile part
5 # number of obstacles
4 # number of vertices for obstacle 1
0 3
0.5 3
0.5 6
0 6
4 # number of vertices for obstacle 2
5 7
7 7
8 8
6 8
3 # number of vertices for obstacle 3
5 2
9 2
9 8
4 # number of vertices for obstacle 4
10 2
11 2
11 4
10 4
4 # number of vertices for obstacle 5
13 6
15 6
15 7
13 7
Output for the Above Input File
2 1
2.5 3
2.5 9
13 9
CMSC 172-Robot Modeling
Laboratory Project 1
Objectives
1. To write a solution to the gross motion path-finding problem in 2D space;
2. To initially write a solution for the above problem restricting only the mobile part to move in two translational dimensions.
3. To extend the code for the second objective above to include the third rotational dimension.
Prerequisites
1. Knowledge in C or Perl or Java programming.
2. Knowledge in scripting documents via the Hypertext Markup Language (HTML).
Required Output
You must publish a web page that will show the code specified in the objectives. The web page must be named ~your_login/www/cmsc/172/proj1.html. It must show your name, the specifics of your solutions and a link to the source code. All of your source codes must be properly documented. If you used multiple files for the source code, you must also provide a link for these. A Missing section must be included if not all requirements are satisfied explaining why you failed to finish the project. All reasons must be technical!
The input to your program must be a filename (or if you want to a form in your HTML code if you want to write a CGI-Perl for this) that follows the following format (each item is a line in your input file):
* Number of vertices for your environment
* The coordinates of the environment's vertices in x y format. Notice the space in between the x- and y-coordinates. Each coordinate must be written on each line and in the neighborhood sequence. Meaning, if vertex B is both adjacent to vertices A and C, then the coordinates for A should be above the coordinates of B while that of C is below of B.
* Number of vertices for the mobile part
* The coordinates of the mobile part's vertices on each line with the same format as writing coordinates above.
* The coordinates of the center of the mobile part at its original position.
* The coordinates of the center of the mobile part at its final destination.
* The number of obstacles
* For each obstacle i, do the following:
o The number of vertices for the ith obstacle
o The coordinates of the ith obstacle's vertices on different lines with the same format as writing coordinates above.
* A comment for each line must be preceded by a the hash symbol (#) but must be written after the data.
The output of the program must be a series of coordinates that the center of the mobile part will have to go to from the original position to the final destination. The solution must be the shortest path. If there is no solution found, the output must be the message No solution was found.
Example
Input File
4 # the environment is a rectangle
0 0
15 0
15 10
0 10
4 # the mobile part is a 4-gon
0 0
4 0
4 2
0 2
2 1 # original position of mobile part
13 9 # target position of the mobile part
5 # number of obstacles
4 # number of vertices for obstacle 1
0 3
0.5 3
0.5 6
0 6
4 # number of vertices for obstacle 2
5 7
7 7
8 8
6 8
3 # number of vertices for obstacle 3
5 2
9 2
9 8
4 # number of vertices for obstacle 4
10 2
11 2
11 4
10 4
4 # number of vertices for obstacle 5
13 6
15 6
15 7
13 7
Output for the Above Input File
2 1
2.5 3
2.5 9
13 9
Comments
Post a Comment