Creation of the robot strategy for RTS
Here is the list of commands to install and start the simulation:
git clone [email protected]:info-telecom-strasbourg/strategy-RTS.git
At this point, the last update is on the branch dev
.
To access it, just enter:
git checkout -b strategy origin/strategy
git pull origin dev
You can now start the simulation with your processing IDE.
In the simulation, there are 2 kind of robots. The green one(s) is/are RTS' robot(s), and the red one(s) is/are the opponent's one(s). The white translucent cone is the area where obstacles are detected. Our robot should slow down if an obstacle is in this area. The green cercle around RTS' robot is the security distance. If the opponent is in the half cercle, RTS' robot should stop.
We also have simulated the behavior of the robot when it collapses with a border of the arena.
Concerning opponent, you can control it with your mouse. You can choose wich click control the robot (2 robots, 2 clicks). The destination should appear with a number when you create it. You can also deleting a point by pressing the key 'd'.
The triangles are the tasks locations:
- Red: the task is not done yet.
- Orange: the task is in progress.
- Green: the task is done.
The tasks location depend on the initial position and adapt themselves with the location given.
The weathercock should take a random color after 25 seconds (black or white). The mooring area appear when our robot detect the color of the weathercock.
The robot will follow this strategy :
- If time left < time to go to the mooring area + time to hoist the flag => go to hoist the flag
- Turn on the light-house
- Dress the windsocks
- Detect the weathercock's color
- Make some tests
- Adapt the code in C++
For angles, we chose to have them in [0, 2*Pi]. And 1 pixel in the simulation correspond to 2mm in reality.
For our classes, we use Pascal case (example: MyClass
) and for our variables/functions, we used Snake case (example: my_varibale
)
Here is a class diagramm of the project:
You can find the rules of the competition by clicking here.