This repository contains Euro NCAP tests in CARLA simulator.
test_1
folder contains CCRs(Car-to-Car Rear stationary) test scenario in which an ego car accelerates and then brakes in front of a stationary car from 100 [m].
The folder contains a few utilities:
- Controller - contains simple controller for the throttle/brake based on the current relative distance.
- Dynamics - retrieve information about the state of the ego car.
- Scene - functions to manage the simulation.
- Visualizer - functions to plot ground-truth bounding box around the stationary car.
- Analysis - parse the
data.csv
file and plot a few insights from the simulation.
test_2
folder holds the modified manual_control.py version, integrated with lane detector, visualize the vehicle's current lanes boundaries. (Currently contains a bug in the waypoint selection 28/02/2024)
-
CARLA docker image - version:
0.9.15
docker pull carlasim/carla:0.9.15
-
CARLA Python package, install with:
pip install carla==0.9.15
-
docker compose.
-
Clone this repository:
git clone [email protected]:iftahnaf/ccr_ncap.git
Note: make sure that you can run docker without sudo
Using docker-compose, you will launch server(CARLA simulator) and client(Python API client) services for the simulation. Running with:
docker compose up
Changing the script is done via altering the command in the docker-compose.yml:
command: >
/bin/bash -c "sleep 10 && python3 test_1/main.py"
Open two terminals.
In the first terminal:
docker run --privileged --gpus all --net=host -e DISPLAY=$DISPLAY carlasim/carla:0.9.15 /bin/bash ./CarlaUE4.sh -RenderOffScreen
In the second terminal:
cd ccr_ncap/
python3 ./test_1/main.py