* Change low_quality argument and fix closing carla bridge
* Some fixes
* Change carla process in test
* Change fov to 120, higher doesn't look good
* Update readme and remove redundant test
* update
* Add folder description
@ -5,40 +5,52 @@ openpilot implements a [bridge](bridge.py) that allows it to run in the [CARLA s
## System Requirements
openpilot doesn't have any extreme hardware requirements, however CARLA requires an NVIDIA graphics card and is very resource-intensive and may not run smoothly on your system. For this case, we have a low quality mode you can activate by running:
```
./start_openpilot_docker.sh --low_quality
```
openpilot doesn't have any extreme hardware requirements, however CARLA requires an NVIDIA graphics card and is very resource-intensive and may not run smoothly on your system.
For this case, we have a the simulator in low quality by default.
You can also check out the [CARLA python documentation](https://carla.readthedocs.io/en/latest/python_api/) to find more parameters to tune that might increase performance on your system.
## Running the simulator
First, start the CARLA server in one terminal.
```
Start Carla simulator, openpilot and bridge processes located in tools/sim:
``` bash
# Terminal 1
./start_carla.sh
# Terminal 2 - Run openpilot and bridge in one Docker:
./start_openpilot_docker.sh
# Running the latest local code execute
# Terminal 2:
./launch_openpilot.sh
# Terminal 3
./bridge.py
```
Then, start the bridge and openpilot in another terminal.
### Bridge usage
_Same commands hold for start_openpilot_docker_
```
./start_openpilot_docker.sh
$ ./bridge.py -h
Usage: bridge.py [options]
Bridge between CARLA and openpilot.
Options:
-h, --help show this help message and exit
--joystick Use joystick input to control the car
--high_quality Set simulator to higher quality (requires good GPU)
--town TOWN Select map to drive in
--spawn_point NUM Number of the spawn point to start in
```
To engage openpilot press 1 a few times while focused on bridge.py to increase the cruise speed.
## Controls
You can control openpilot driving in the simulation with the following keys
All inputs:
| key | functionality |
|:---:|:---------------:|
|:----:|:-----------------:|
| 1 | Cruise up 5 mph |
| 2 | Cruise down 5 mph |
| 3 | Cruise cancel |
| q | Exit all |
To see the options for changing the environment, such as the town, spawn point or precipitation, you can run `./start_openpilot_docker.sh --help`.
This will print the help output inside the docker container. You need to exit the docker container before running `./start_openpilot_docker.sh` again.
@ -70,7 +61,7 @@ class TestCarlaIntegration(unittest.TestCase):
no_car_events_issues_once=True
break
self.assertTrue(no_car_events_issues_once,f"Failed because sm offline, or CarEvents '{car_event_issues}' or processes not running '{not_running}'")
self.assertTrue(no_car_events_issues_once,f"Failed because no messages received, or CarEvents '{car_event_issues}' or processes not running '{not_running}'")
start_time=time.monotonic()
min_counts_control_active=100
@ -99,8 +90,11 @@ class TestCarlaIntegration(unittest.TestCase):