Fixes safety replay
parent
2c220b623d
commit
6280509559
|
@ -1,6 +1,6 @@
|
|||
FROM ubuntu:16.04
|
||||
|
||||
RUN apt-get update && apt-get install -y make python-dev python-pip locales curl git zlib1g-dev libffi-dev bzip2 libssl-dev
|
||||
RUN apt-get update && apt-get install -y make python python-pip locales curl git zlib1g-dev libffi-dev bzip2 libssl-dev
|
||||
|
||||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
|
||||
ENV LANG en_US.UTF-8
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
FROM ubuntu:16.04
|
||||
|
||||
RUN apt-get update && apt-get install -y make clang python python-pip git libarchive-dev libusb-1.0-0
|
||||
RUN apt-get update && apt-get install -y make clang python python-pip git libarchive-dev libusb-1.0-0 locales curl zlib1g-dev libffi-dev bzip2 libssl-dev libbz2-dev
|
||||
|
||||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
|
||||
|
||||
ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}"
|
||||
RUN pyenv install 3.7.3
|
||||
RUN pyenv global 3.7.3
|
||||
RUN pyenv rehash
|
||||
|
||||
COPY tests/safety_replay/requirements.txt requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
|
@ -17,4 +29,4 @@ COPY . /openpilot/panda
|
|||
WORKDIR /openpilot/panda/tests/safety_replay
|
||||
RUN git clone https://github.com/commaai/openpilot-tools.git tools || true
|
||||
WORKDIR tools
|
||||
RUN git checkout feb724a14f0f5223c700c94317efaf46923fd48a
|
||||
RUN git checkout d69c6bc85f221766305ec53956e9a1d3bf283160
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
import struct
|
||||
import panda.tests.safety.libpandasafety_py as libpandasafety_py
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ def replay_drive(lr, safety_mode, param):
|
|||
for msg in lr:
|
||||
if start_t is None:
|
||||
start_t = msg.logMonoTime
|
||||
safety.set_timer(((msg.logMonoTime / 1000)) % 0xFFFFFFFF)
|
||||
safety.set_timer(((msg.logMonoTime // 1000)) % 0xFFFFFFFF)
|
||||
|
||||
if msg.which() == 'sendcan':
|
||||
for canmsg in msg.sendcan:
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
import os
|
||||
import requests
|
||||
|
||||
from .helpers import safety_modes
|
||||
from .replay_drive import replay_drive
|
||||
from helpers import safety_modes
|
||||
from replay_drive import replay_drive
|
||||
from tools.lib.logreader import LogReader
|
||||
|
||||
BASE_URL = "https://commadataci.blob.core.windows.net/openpilotci/"
|
||||
|
@ -23,7 +23,7 @@ logs = [
|
|||
if __name__ == "__main__":
|
||||
for route, _, _ in logs:
|
||||
if not os.path.isfile(route):
|
||||
with open(route, "w") as f:
|
||||
with open(route, "wb") as f:
|
||||
f.write(requests.get(BASE_URL + route).content)
|
||||
|
||||
failed = []
|
||||
|
|
Loading…
Reference in New Issue