Goal:
- setup Carla in Docker as server
- setup Python client to connect to Carla server
- setup autonomous agent to control the vehicle in Carla and render
The Carla leadboard
library has set up a few scenarios to run customized agents for performance comparison. We can start from there.
setup environment: check this out.
Shapely
library has an error on Windows 11. need a fresh installation, probably using conda install
instead of pip
conda install -c conda-forge shapely==1.7.1 numpy==1.18.4
The followings steps are for running Carla 0.9.14 in a docker container, and connect to it using Python client in local.
- open a terminal, and run one server using the scripts in
./run_server
.bash ./run_server/run_carla_0.9.14.sh
- open another terminal to run a client code in local
conda activate carla-py37 source setup.sh python run_agent.py
The following steps are for runing Carla Leaderboard 2.0 examples in local:
- open a terminal, and run one server using the scripts in
./run_server
.source setup_leaderboard2.0.sh bash ./run_server/run_carla_leaderboard2.0.sh
- open another terminal to run the client code in local
- activate local conda environment, e.g.,
conda activate carla-py37
- set up necessary environment variables
source setup_leaderboard2.0.sh
- run a human agent example using
bash run_agent.sh
- activate local conda environment, e.g.,
- open a third terminal to run manual control
conda activate carla-py37 python ./scenario_runner/manual_control.py
If we want to run Carla in Docker, and render the GUI
on the display in the host machine:
0.9.10.1
:0.9.12
: the command on the homepage as follows, does not workThis is no error message, but just not running.sudo docker run --privileged --gpus all --net=host -e DISPLAY=$DISPLAY carlasim/carla:0.9.12 /bin/bash ./CarlaUE4.sh
If we simply use off-screen mode,
0.9.10.1
:0.9.12
: the following command from homepage will worksudo docker run --privileged --gpus all --net=host -v /tmp/.X11-unix:/tmp/.X11-unix:rw carlasim/carla:0.9.12 /bin/bash ./CarlaUE4.sh -RenderOffScreen
Carla on Windows SUCKS.
-0.9.14
: The shipped binaries from github release cannot load Town06/06 and Town12
and maybe others.
It seems one has to build Carla from source to get it working according to this.
- if needed,
carla_birdeye_view
library is outdated.- the map name in Carla 0.9.1 has changed to
Carla/Maps/TownXX/TownXX
instead ofTownXX
(as programmed). The map name inparametrized_cache_path()
should be updated so that this can be taken care of.
- the map name in Carla 0.9.1 has changed to
- set up simulation environment
- collect training data
- collect future way points
- collect bounding box
- how to remove bounding boxes that are for occuluded objects