Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[]{article}
- \usepackage{amsmath}
- \begin{document}
- \title{Racing Track Project\\Software Engineering Lab Spring 2014}
- \author{Prof. Dr. Bendick Mahleko, Dmitrii Cucleschin\\Nikolce Kolev, Dominik Kundel, Vlad Ungureanu}
- \date{\today}
- \maketitle
- \section{Overview}
- The object of this year's software engineering lab is to design and implement a control software for a car which is going on a race track. Your control software will communicate with the car over a network socket. It's object is to guide the car through the track and avoid upcoming obstacles in order to obtain the best time on each track.
- \section{Initial data}
- When the user connects to the server it receives the string "INIT". After the init message the user will receive the height and width of the map. The map will be sent as an ASCII file where '\_' means track and '\#' means off-road. In the map the car will be represented as a 'C' character. After the map the user receives the specifications of the car that being maxSpeed measured in cells per second. The user needs to sent the 'START' string to the server in order to begin the simulation.
- \section{Race car behaviour}
- In our race track the car will be considered as a rectangle with width and length. The map is formed by cells, each cell has a fixed dimension which is a 1x1 m square. To determine the position of the car on the race track
- a - accelerate
- b - break
- i - idleSpeed
- el - extremeLeft
- er - extremeRight
- l - left
- r - right
- x - road
- o - off-road
- c - car
- . - rocks
- w - wall
- +- - light
- h - health
- s - speed
- v - vodka
- currentSpeed
- vision *as ASCII matrix*
- currentHP
- \section{Network Protocol}
- The client will communicate with the server over a TCP/IP socket (IP + portNumber). The accepted characters by the server are all the ASCII chars. There will be
- 3 types of messages.
- \subsection{INIT}
- At the start of program the client needs to send to the server the following message: "Hello, I am USER!" where USER is the name of the current team. The server will reply with an "Hi, USER!" message and will send to the user an NxN matrix which is the map of the track. After the map is received the server send the maxSpeed of the race car which is measured in cells per second. The client needs to send the message "START" in order to begin the race.\\\\
- C: Hello, I am team1!\\
- S: Hi, team1!\\
- S: 3\\
- S: $\begin{matrix} \#&\_&\# \\ \#&\_&\# \\ \#&\_&\# \end{matrix}$\\
- S: 1.3\\
- C: START
- \subsection{VISION}
- After every decision the client does and reports it back the server will send a VISION message which consists of the current track time, the current speed of the car, the angle of the car with the horizontal axis, the HP of the car and the obstacles that are in front of the car *represented as an ASCII matrix*.\\\\
- \textbf{VI} \textit{time} \textit{x} \textit{y} \textit{speed} \textit{angle} \textit{hp} \textit{obstacles}\\
- \textbf{time} is the time elapsed since the start of the race\\
- \indent\textbf{x} is the x coordinate of the car on the map\\
- \indent\textbf{y} is the y coordinate of the car on the map\\
- \indent\textbf{speed} is the current speed of the car measured in meters per second\\
- \indent\textbf{angle} is the angle the car has with the horizontal line measured in degrees\\
- \indent\textbf{hp} is the current health of the car measured on a scale from 0 to 100\\\\
- \indent\textbf{obstacles} is an ASCII matrix which contains the objects the car sees in front. Each obstacle has a width and a length. The location of the objects will be computer relative to the position of the car which is reported by the server. They have different types:
- \begin{itemize}
- \item rocks *r*: they slow your car down and reduce the hp.(Car.speed -= 5\%*Car.speed; Car.hp -= 10\%*Car.hp )
- \item wall *w*: if the car hits the wall the race is finished and the score will be reported back.
- \item light *+-*: if the car passes the light indicator when the sign is '+' the race will continue normally without any penalties. If the sign is '-' and the car passes it's health will be decreased by 20\%. (Car.hp -= 20\%*Car.hp)
- \item healthBoost 'h': if the car takes the healthBoost and it's health is below 100\% the health will be raised by the value of the boost otherwise nothing will change.
- \item speedBoost 's': if the car takes the speedBoost and it's speed is lower than the max value the speed will be raised by the value of the boost. Otherwise the speed of the car will be increased by the value of the boost 2.5 seconds.
- \item vodka 'v': if the car encounters the vodka obstacle the directions will be switched. If a steer left action will be performed in reality steer right will be done and the same way for steer right.
- \item prohibition 'p': if the prohibition perk is encountered and the vodka obstacle has been active it's effect immediately disappears, otherwise nothing happens.
- \end{itemize}
- C: decision\\
- S: \textbf{VI} 25 10 95 46 \\
- S: $\begin{matrix} \# &\_ &\_ &\_ &p &\_ &\_ &\#\\
- \# &\_ &\_ &- &\_ &v &\_ &\#\\
- \# &+ &\_ &h &\_ &\_ &\_ &\#\\
- \# &\_ &\_ &\_ &\_ &w &w &\#\\
- \# &\_ &\_ &\_ &r &\_ &\_ &\#\\
- \# &\_ &\_ &\_ &c &\_ &\_ &\#
- \end{matrix}$
- \subsection{FIN}
- The server send the message 'FIN time status' when the race track is completed successfully. 'time' is a decimal number representing the number of seconds on the track and status is either 'dead' or 'alive' which represents the end state of the car.
- \section{Implementation}
- \begin{itemize}
- \item The project needs to be coded either in C or C++ and it must compile and run on the machines in the CLAMV lab. The machines run Linux. No additional libraries are to be used in the project. In order to build the project a Makefile needs to be provided which automatically searches for sources, compiles and links them.
- \item A 'driver' file needs to be provided to the software in order to control the car on the track.
- \item All files of the project must be delivered as an archive (tar, zip) including all source and documentation files. The generation of the programs and the final documentation in PDF must be automated by a suitable Makefile. The controller software must be documented in a Unix manual page.
- \item The programs have to be robust against erroneous inputs. In case an error is detected, a suitable error message must be written to the standard error output channel and the program must exit with an exit code unequal to zero.
- \item The code submitted for this project must be written by the team members themselves. Submitting code that was written by others will result in a fail grade for the team members involved. Any code not written by the team itself must be acknowledged and clearly identified in the documentation.
- \end{itemize}
- \section{Contest organization and scoring}
- \section{Testing your binary}
- The binary of the project needs to be run from the CLAMV machines and must accept as parameters the driver file, ip and port of the server.\\
- \textit{./run driver ip port}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment