]> rtime.felk.cvut.cz Git - hubacji1/py-carla.git/blob - README.md
Update readme with scenario runner example
[hubacji1/py-carla.git] / README.md
1 py-carla repository contains auxilliary scripts for CARLA simulator that
2 are expected to be run in Python3.7. (Python3.7 is due to compatibility
3 with `carla` package available on PyPI.)
4
5 On ubuntu 22.04, install the Python3.7:
6
7         sudo add-apt-repository ppa:deadsnakes/ppa
8         sudo apt-get update
9         sudo apt-get install python3.7 python3.7-venv
10
11 and create virtual environment `tve`:
12
13         python3.7 -m venv tve
14         . tve/bin/activate
15         pip install -r requirements.txt
16
17 Use `tve` virtual environment whenever running any scripts. It is
18 expected the following scripts are run inside the `tve` virtual
19 environment.
20
21 Links:
22
23 - https://carla.readthedocs.io
24
25
26 Install scenario runner dependencies (cd to scenario runner directory):
27
28     pip install -r requirements.txt
29
30 and set the PYTHONPATH:
31
32     export PYTHONPATH="/path/to/carla/PythonAPI/carla:$PYTHONPATH"
33
34 Timeout of 10 seconds is sometimes too low, so do not be afraid to
35 increase it:
36
37     --timeout 9999
38
39 Check out the scenarios from the scenario runner and run some:
40
41     python scenario_runner.py --list
42     python scenario_runner.py --scenario ChangeLane_1 --reloadWorld
43
44 Init coordinates of ego are in XML file, e.g. for `ChangeLane_1`
45 scenario in `srunner/examples/ChangeLane.xml` file. Find the coordinates
46 and focus on them:
47
48     ./focus.py 284.4,16.4,-173
49
50 Links:
51
52 - https://carla-scenariorunner.readthedocs.io