From d4bf764d99830482de01c04e3ad70a64fedd99cd Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 18 Nov 2020 13:10:37 -0800 Subject: [PATCH] update simulator to ubuntu 20.04 (#2463) * fix sim build in 20.04 * run ci * fix docker build * restore ci cofnig Co-authored-by: Willem Melching old-commit-hash: cc1bca542d8a12acc381fc3d284d37b57b12c6ee --- .github/workflows/sim_tests.yaml | 2 +- tools/sim/Dockerfile.sim | 24 ++---------------------- tools/sim/README.md | 2 ++ tools/sim/lib/replay.sh | 3 ++- 4 files changed, 7 insertions(+), 24 deletions(-) diff --git a/.github/workflows/sim_tests.yaml b/.github/workflows/sim_tests.yaml index bac6239cb8..3d703e506b 100644 --- a/.github/workflows/sim_tests.yaml +++ b/.github/workflows/sim_tests.yaml @@ -8,7 +8,7 @@ jobs: name: build container runs-on: ubuntu-20.04 timeout-minutes: 50 - if: github.event_name == 'schedule' && github.repository == 'commaai/openpilot' + if: github.repository == 'commaai/openpilot' steps: - uses: actions/checkout@v2 with: diff --git a/tools/sim/Dockerfile.sim b/tools/sim/Dockerfile.sim index 02e59455bd..9488a22b1d 100644 --- a/tools/sim/Dockerfile.sim +++ b/tools/sim/Dockerfile.sim @@ -6,22 +6,13 @@ RUN apt-get update && apt-get install -y \ tar \ curl \ xz-utils \ - beignet-opencl-icd \ - + libglvnd-dev \ alien \ dbus \ gcc-arm-none-eabi \ tmux \ vim \ - - # libglvnd dependencies - automake \ - libtool \ - libxext-dev \ - libx11-dev \ - x11proto-gl-dev \ - libpng16-16 \ && rm -rf /var/lib/apt/lists/* # Intel OpenCL driver @@ -52,16 +43,6 @@ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,display RUN dbus-uuidgen > /etc/machine-id -# we can apt-get after moving to a newer ubuntu -WORKDIR /opt/libglvnd -RUN git clone --branch="0.1.1" https://github.com/NVIDIA/libglvnd.git . && \ - ./autogen.sh && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib/x86_64-linux-gnu && \ - make -j"$(nproc)" install-strip && \ - find /usr/local/lib/x86_64-linux-gnu -type f -name 'lib*.la' -delete - -ENV LD_LIBRARY_PATH /usr/local/lib/x86_64-linux-gnu:/usr/local/lib/i386-linux-gnu${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - # CARLA python api COPY ./tools/sim/install_carla.sh /tmp RUN /tmp/install_carla.sh @@ -76,8 +57,7 @@ RUN mkdir -p $HOME/openpilot COPY SConstruct $HOME/openpilot/ COPY ./phonelibs $HOME/openpilot/phonelibs -COPY ./laika $HOME/openpilot/laika -COPY ./laika_repo $HOME/openpilot/laika_repo +COPY ./site_scons $HOME/openpilot/site_scons COPY ./rednose $HOME/openpilot/rednose COPY ./common $HOME/openpilot/common COPY ./models $HOME/openpilot/models diff --git a/tools/sim/README.md b/tools/sim/README.md index 0dfda1bfc0..4d271cb4de 100644 --- a/tools/sim/README.md +++ b/tools/sim/README.md @@ -3,6 +3,7 @@ openpilot in simulator ## Running the simulator + First, start the CARLA server. ``` ./start_carla.sh @@ -14,6 +15,7 @@ Then start bridge and openpilot. ``` 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 diff --git a/tools/sim/lib/replay.sh b/tools/sim/lib/replay.sh index 38c2140096..6a48d0412e 100755 --- a/tools/sim/lib/replay.sh +++ b/tools/sim/lib/replay.sh @@ -1,5 +1,6 @@ #!/bin/bash + cd ~/openpilot/tools/nui + # vision, boardd, sensorsd, gpsd ALLOW=frame,can,ubloxRaw,health,sensorEvents,gpsNMEA,gpsLocation ./nui "02ec6bea180a4d36/2019-10-25--10-18-09" -