Skip to main content

CMSC 172 - Project 1

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

Comments

Popular posts from this blog

From FOMO to JOMO

Until very recently I believed that I needed to be on top of the latest news and happenings not only in my field (computer science and software engineering) but also in as many things as I can be on top of. This meant subscribing to all sorts of magazines, newsletters, YouTube channels, Twitch streamers, watching TV and live sport events, etc. — I was on top of a lot of the latest happenings, trends, news, interesting developments. I was having fun and I felt busy. What I did not feel was particularly effective nor productive. I felt like I was consuming so much information with the thought that it might be useful someday. When I was younger this wouldn’t have been an issue but I realised that ever since I’ve started taking stock of what I’ve been spending my time on, that a lot of it I’ve been spending just staying on top of things that I really didn’t need to be on top of. This article is about some of the realisations I’ve made in the course of exploring this issue of “FOMO” or th…

Futures and Options I: My Introduction to Computing

I've recently been thinking about how my decisions early in life have done me good to put me where I'm at right now. I've certainly lived a very fortunate life -- been blessed with so many good things and been down-right lucky being at the right place at the right time. My 30 year journey to where I am now has been very interesting. I can pretty much say that the experiences I've had up to this point have very much contributed to making me who I am -- and that I regret nothing. Still though I keep thinking about what my life would be like if I hadn't made certain choices I did make throughout the years. There are a few choices I've made that I've stuck to and I keep thinking about wondering "what if I made a different choice instead" -- and the more I think about it, the more I'm happy about the decisions I've made.

Note: This is Part 1 of a series about my early choices in life which have gotten me to where I am today. If you're intere…

Futures and Options III: Economics, Journalism, or Computer Science

I realise it's been a year since my previous post on this blog, and I've found myself having very little time to do another "brain dump" on the subject of my early choices in life. With that in mind (and as I'll be traveling again soon) I get to think a little more and reflect on a few of the things that have happened.

Much like the previous post, this one's set in high school -- where I was part of the swimming team, in a band, had been programming with Turbo Pascal, Java, and then C++ later on, and was about to make a choice that would literally change the course of my life. This one is about the choices I made, and the ones that were made for me.

Note: This is part 3 of a series about my early choices in life which have gotten me to where I am today. I would greatly appreciate your feedback and thoughts, as well as for your reading through this series!