remove carla dependency (#30139)
* only docs and default
* remove carla dependency
* remove carla dependency
old-commit-hash: 3c55f76790
This commit is contained in:
parent
733c2b329c
commit
07c27071a4
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:305c1ec645193b0916dd8254b13a5bd6582eac513dcb59e357cf9ba003ac8183
|
||||
size 445997
|
||||
oid sha256:d5af206fbe7c5b1e572047626db4eaab9c470b77334efc543e94d6b15c2f49ca
|
||||
size 447702
|
||||
|
|
|
@ -124,7 +124,6 @@ av = "*"
|
|||
azure-identity = "*"
|
||||
azure-storage-blob = "*"
|
||||
breathe = "*"
|
||||
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'" }
|
||||
coverage = "*"
|
||||
dictdiffer = "*"
|
||||
ft4222 = "*"
|
||||
|
@ -167,6 +166,11 @@ types-requests = "*"
|
|||
types-tabulate = "*"
|
||||
pyqt5 = { version = "*", 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"]
|
||||
|
|
|
@ -57,7 +57,13 @@ Start bridge processes located in tools/sim:
|
|||
|
||||
## Carla
|
||||
|
||||
CARLA is also partially supported, though the performance is not great. 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.
|
||||
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.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import carla
|
||||
|
||||
from openpilot.tools.sim.bridge.common import SimulatorBridge
|
||||
from openpilot.tools.sim.bridge.carla.carla_world import CarlaWorld
|
||||
|
||||
|
@ -15,6 +13,8 @@ class CarlaBridge(SimulatorBridge):
|
|||
self.num_selected_spawn_point = arguments.num_selected_spawn_point
|
||||
|
||||
def spawn_world(self):
|
||||
import carla
|
||||
|
||||
client = carla.Client(self.host, self.port)
|
||||
client.set_timeout(5)
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import carla
|
||||
import numpy as np
|
||||
|
||||
from openpilot.common.params import Params
|
||||
|
@ -10,6 +9,8 @@ from openpilot.tools.sim.lib.camerad import W, H
|
|||
class CarlaWorld(World):
|
||||
def __init__(self, client, high_quality, dual_camera, num_selected_spawn_point, town):
|
||||
super().__init__(dual_camera)
|
||||
import carla
|
||||
|
||||
low_quality_layers = carla.MapLayer(carla.MapLayer.Ground | carla.MapLayer.Walls | carla.MapLayer.Decals)
|
||||
|
||||
layers = carla.MapLayer.All if high_quality else low_quality_layers
|
||||
|
@ -139,5 +140,6 @@ class CarlaWorld(World):
|
|||
self.world.tick()
|
||||
|
||||
def reset(self):
|
||||
import carla
|
||||
self.vehicle.set_transform(self.spawn_point)
|
||||
self.vehicle.set_target_velocity(carla.Vector3D())
|
||||
|
|
Loading…
Reference in New Issue