EPITECH project - Artificial Intelligence
Report Bug
·
Request Feature
If you are seeing this repository, please just star it! It will not take much time! :)
The goal of this project is to create an autonomous car. It must be capable of driving on a track without hitting the walls or driving in the wrong direction.
For this we have at our disposal:
-
CoppeliaSim, a simulator created by Coppelia Robotics. It allows to create and control robots. For this project, we use virtual tracks and a virtual car that will be controlled by our AI.
-
an API (binary name:
n4s
). It's a communication interface that proposes a set of actions that we can use. It can be used alone to to test the command line communication protocol. -
a shell script (binary name:
pipes.sh
) that connects the program to the API and runs simulations. it is the binary to be executed once the program has been compiled.
The communication is done via a text-type protocol
Command | Value range | answer type |
---|---|---|
START_SIMULATION | - | (1) |
STOP_SIMULATION | - | (1) |
CAR_FORWARD:float | [0;1] | (1) |
CAR_BACKWARDS:float | [0;1] | (1) |
WHEELS_DIR:float | [-1;1] | (1) |
GET_INFO_LIDAR | - | (2) |
GET_CURRENT_SPEED | - | (3) |
GET_CURRENT_WHEELS | - | (3) |
CYCLE_WAIT:int | [0; INT_MAX] | (3) |
GET_CAR_SPEED_MAX | - | (3) |
GET_CAR_SPEED_MIN | - | (3) |
GET_INFO_SIMTIME | - | (4) |
Here are the different answer formats, corresponding to each type:
- (1):
VALUE_ID:STATUS:CODE_STR:ADDITIONNAL_INFO
- (2):
VALUE_ID:STATUS:CODE_STR[:float]*32:ADDITIONNAL_INFO
- (3):
VALUE_ID:STATUS:CODE_STR:float:ADDITIONNAL_INFO
- (4):
VALUE_ID:STATUS:CODE_STR:[long,long]:ADDITIONNAL_INFO
- Makefile using gcc
To get a local copy up and running follow these simple steps.
Clone the repositorie. On the root download and extract CoppeliaSim
wget https://www.coppeliarobotics.com/files/CoppeliaSim_Edu_V4_0_0_Ubuntu18_04.tar.xz
tar xvf CoppeliaSim_Edu_V4_0_0_Ubuntu18_04.tar.xz
Start CoppeliaSim
with
./CoppeliaSim_Edu_V4_0_0_Ubuntu18_04/coppeliaSim.sh
Once the launched software loads a scene in File
> Open scene...
> anyscene.ttt
(Scenes are stored in n4s_paquage/scene
)
Run the ai with pipes.sh
make
./pipes.sh