Skip to content

Commit

Permalink
Simulator: remove carla (commaai#30690)
Browse files Browse the repository at this point in the history
* no carla

* no arg and stylize metadrive
  • Loading branch information
jnewb1 authored Dec 12, 2023
1 parent 9807bd9 commit 11ec5bf
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 360 deletions.
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"DISPLAY": "${localEnv:DISPLAY}",
"PYTHONPATH": "${containerWorkspaceFolder}",
"TERM": "xterm-256color",
"CARLA_HOST": "host.docker.internal",
"force_color_prompt": "1"
},
"runArgs": [
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ All openpilot services can run as usual on a PC without requiring special hardwa

With openpilot's tools, you can plot logs, replay drives, and watch the full-res camera streams. See [the tools README](tools/README.md) for more information.

You can also run openpilot in simulation [with the CARLA simulator](tools/sim/README.md). This allows openpilot to drive around a virtual car on your Ubuntu machine. The whole setup should only take a few minutes but does require a decent GPU.
You can also run openpilot in simulation [with the MetaDrive simulator](tools/sim/README.md). This allows openpilot to drive around a virtual car on your Ubuntu machine. The whole setup should only take a few minutes but does require a decent GPU.

A PC running openpilot can also control your vehicle if it is connected to a [webcam](https://github.com/commaai/openpilot/tree/master/tools/webcam), a [black panda](https://comma.ai/shop/products/panda), and a [harness](https://comma.ai/shop/products/car-harness).

Expand Down
56 changes: 18 additions & 38 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,6 @@ types-tabulate = "*"
# this is only pinned since 5.15.11 is broken
pyqt5 = { version = "==5.15.2", markers = "platform_machine == 'x86_64'" } # no aarch64 wheels for macOS/linux

[tool.poetry.group.carla]
optional = true

[tool.poetry.group.carla.dependencies]
carla = { url = "https://github.com/commaai/carla/releases/download/3.11.4/carla-0.9.14-cp311-cp311-linux_x86_64.whl", platform = "linux", markers = "platform_machine == 'x86_64'" }

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Expand Down
39 changes: 3 additions & 36 deletions tools/sim/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openpilot in simulator
=====================

openpilot implements a [bridge](run_bridge.py) that allows it to run in the [MetaDrive simulator](https://github.com/metadriverse/metadrive) or [CARLA simulator](https://carla.org/).
openpilot implements a [bridge](run_bridge.py) that allows it to run in the [MetaDrive simulator](https://github.com/metadriverse/metadrive).

## Launching openpilot
First, start openpilot.
Expand All @@ -13,8 +13,7 @@ First, start openpilot.
## Bridge usage
```
$ ./run_bridge.py -h
usage: run_bridge.py [-h] [--joystick] [--high_quality] [--dual_camera] [--simulator SIMULATOR] [--town TOWN] [--spawn_point NUM_SELECTED_SPAWN_POINT] [--host HOST] [--port PORT]
usage: run_bridge.py [-h] [--joystick] [--high_quality] [--dual_camera] [--simulator SIMULATOR]
Bridge between the simulator and openpilot.
options:
Expand All @@ -23,10 +22,6 @@ options:
--high_quality
--dual_camera
--simulator SIMULATOR
--town TOWN
--spawn_point NUM_SELECTED_SPAWN_POINT
--host HOST
--port PORT
```

#### Bridge Controls:
Expand All @@ -53,32 +48,4 @@ options:
Start bridge processes located in tools/sim:
``` bash
./run_bridge.py --simulator metadrive
```

## Carla

CARLA is also partially supported, though the performance is not great. It needs to be manually installed with:

```bash
poetry install --with=carla
```

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 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.

### Launching Carla
Start Carla simulator and bridge processes located in tools/sim:
``` bash
# Terminal 1
./start_carla.sh

# Terminal 2
./run_bridge.py --simulator carla
```

## Further Reading

The following resources contain more details and troubleshooting tips.
* [CARLA on the openpilot wiki](https://github.com/commaai/openpilot/wiki/CARLA)
```
22 changes: 0 additions & 22 deletions tools/sim/bridge/carla/carla_bridge.py

This file was deleted.

Loading

0 comments on commit 11ec5bf

Please sign in to comment.