mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 03:03:57 +08:00
* use carla provided frame_number
* fix carla comm issues error
* add minimal W-A-S-D keyboard controls
* fix window from carla docker not showing
* carla 0.9.7 uses `frame`, not `frame_number`
* set safetyModel on health for simulator
* safetyModel check now works with simulator
* ignore ubloxRaw and frontFrame when running sim
* Update selfdrive/controls/controlsd.py
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* added WINDOW flag for optional show carla window
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: c03a95f7f9
35 lines
1.1 KiB
Bash
Executable File
35 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
#Requires nvidia docker - https://github.com/NVIDIA/nvidia-docker
|
|
if ! $(apt list --installed | grep -q nvidia-container-toolkit); then
|
|
if [ -z "$INSTALL" ]; then
|
|
echo "Nvidia docker is required. Re-run with INSTALL=1 to automatically install."
|
|
exit 0
|
|
else
|
|
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
|
|
echo $distribution
|
|
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
|
|
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
|
|
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
|
|
sudo systemctl restart docker
|
|
fi
|
|
fi
|
|
|
|
docker pull carlasim/carla:0.9.7
|
|
|
|
if [ -z "$WINDOW" ]; then
|
|
docker run -it --net=host --gpus all carlasim/carla:0.9.7
|
|
else
|
|
docker run --name openpilot_carla \
|
|
--privileged --rm \
|
|
--net=host \
|
|
-e SDL_VIDEODRIVER=x11 \
|
|
-e DISPLAY=$DISPLAY \
|
|
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
|
-it \
|
|
--gpus all \
|
|
carlasim/carla:0.9.7 \
|
|
./CarlaUE4.sh -quality-level=Medium
|
|
fi
|
|
|