- Carla 0.9.15
- Python 3.8
Install the pyenv application via your package manager, e.g.
sudo apt install pyenv
Install Python 3.8 using pyenv:
pyenv install 3.8
Open a shell using Python 3.8:
pyenv shell 3.8
Set up and install Carla 0.9.15 according to its instructions
- Clone this repository
- Create a virtual environment using the Python 3.8 shell and activate it
python -m venv ~/.venvs/carla
source ~/.venvs/carla/bin/activate
- Install the required packages to the virtual environment for both carla and REMO
cd REMO_ROOT
pip install -r requirements.txt
- Add the
REMO/srcfolder to the python path
Two environment variables should be configured to allow starting the carla server via etc.
If using a virtual environment, edit the activate script in a text editor, e.g.
vim ~/.venvs/carla/bin/activate
Append the following two lines and update the paths according to your installation
export REMO_SCENARIO_RUNNER_ROOT="/path/to/scenario_runner"
export REMO_CARLA_SERVER_ROOT="/path/to/carla_server"
Reactivate your virtual environment to load the updated environment:
source ~/.venvs/carla/bin/activate
A test suite is provided which uses the pytest framework. The tests are present in the src/tests folder and can be run by using the pytest command from the src directory.
To run an example, navigate to the src folder and run the command:
python3 examples/EXAMPLE_NAME
where EXAMPLE_NAME is one of the following:
launch_server.pyStarting the UE4 Carla server via the APInearby_objects.pyQuerying a set of environment objects within a given radius of a given location, and then filtering that set to only include those of type "Poles"api_example_run_scenario.pyLaunching a scenario, using manual control to control the ego vehicle. The scenario is recorded for 20 seconds, after which the metadata is written to the default location. The metadata and replay file are then reloaded, with the ego vehicle replaced by a new one which is independently controlled.play_replay.pyLaunching a replay with modified ego vehicle without first immediately recording the scenario. N.B. you must run theapi_example_run_scenario.pyexample before running this one, or there will be no replay metadata to load.verify_stable_ids.pyVerifies that object ids are consistent across multiple replays of a scenarioremove_fences.pyShows how to remove objects of a certain type within a given radius of the ego vehicle
-
Clone the Transfuser++ repository
-
Download the pre-trained agents:
mkdir model_ckpt wget https://s3.eu-central-1.amazonaws.com/avg-projects/transfuser/models_2022.zip -P model_ckpt unzip model_ckpt/models_2022.zip -d model_ckpt/ rm model_ckpt/models_2022.zip -
Test that this is set up correctly using the local leaderboard script
./leaderboard/scripts/local_evaluation.sh <carla root> <working directory of this repo (*/transfuser/)> -
Use
"transfuser"as the ads name in the ScenarioConfig object