Commit Graph

125 Commits

Author SHA1 Message Date
Shane Smiskol
5ed587ebef controls: block resume if cruise not previously engaged (#25402)
* see if this works at all

* can revert this

* think adding a no entry conditionally is nicer

* then we can revert this

* 0 makes more sense

* Revert "0 makes more sense"

This reverts commit efc89e8a2389ef58fbc0cec0a2872d24db524867.

* gm CC uses > 70

* bump cereal

* comment

* test on Honda

* whoops

* works

* add exception with todo

* moved button enable events to controlsd

* get rid of that

get rid of that

* different values for now

* car interfaces add enable event, controlsd can block it

* Regen and update refs

* delete if not set

* One place

one place

* regen routes are uninitialized first few frames

* Trim start of segment so it's like original segment

* stash

* regen

* not working

* clean up

* more cleanup

* revert

* bump ceral

* actually check resume button

* whoops

* pcmCruise cars don't use setSpeed, so we're good

* engage correctly in sim

* Update ref_commit

* Update refs
2022-08-17 18:03:33 -07:00
Adeeb Shihadeh
49044b5399 remove old tools script 2022-08-07 17:10:14 -07:00
Jeroen
26d29d2138 sim: role_name attribute used by ScenarioRunner for CARLA (#25315) 2022-07-31 13:18:02 -07:00
Adeeb Shihadeh
0ca62bf7df let can packer handle counter (#25240)
* let can packer handle counter

* diff is expected

* update refs

* clean that up

* bump opendbc

* fix sim
2022-07-21 20:54:53 -07:00
Adeeb Shihadeh
505bbce29d controlsd: handle radar missing + cleanup system error handling (#25179)
* controlsd: handle radar missing + cleanup system erorr handling

* fix carla

* update refs
2022-07-14 19:55:18 -07:00
ZwX1616
6721f0ef57 fix carla test fake driverState (#24959)
use driverstatev2
2022-06-24 14:29:46 -07:00
Adeeb Shihadeh
569a39ff76 CANParser: invalid until valid (#24945)
* CANParser: invalid until valid

* bump opendbc

* bump opendbc

* fix counter in sim
2022-06-22 15:38:38 -07:00
Gijs Koning
1c4b145aa4 Improve laikad cpu usage. Less pos fix. Less local imports (#24887)
* Improve laikad cpu usage. Less pos fix. Not local imports

* Add laika to files_common

* Add laika to dockerfile sim

* Fix

* Fix

* undo
2022-06-20 14:24:11 +02:00
Adeeb Shihadeh
1baf0e3f4a sim: update cl kernel path 2022-06-19 15:49:38 -07:00
Adeeb Shihadeh
39da6912ea misc jenkins fixups (#24840)
* bump cereal

* remove that

* pull cl image

* lil docker cleanup
2022-06-12 18:00:00 -07:00
Jeroen
1c29b20e72 Updated CARLA to v0.9.13 (#24575)
* Updated CARLA to v0.9.13

* pipenv lock

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-06-12 09:32:18 -07:00
Maxime Desroches
5add0c6159 simulator: run simulator test in ci (#24691)
* run simulator test in ci

* block navd process

* block ui

* fix jenkins

* build docker

* remove tty

* remove tty for carla

* detach carla_sim

* more retries

* only build once

* add more time for bridge

* cleanup

* use qt offscreen

* expose to docker

* block ui

* use new dockerimage

* fix

* from ubuntu20.04

* install curl

* add ssh

* add locales

* noninteractive

* syntax

* use base

* smaller image

* add git + git lfs

* kill carla

* run in parallel

* fix missing agents

* default agent?

* little cleanup

* default doesn't work

* not in ci

* fix path

* fix path

* new msg

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-06-11 15:32:12 -07:00
HaraldSchafer
a2c6b30c98 Fix onnx model replay (#24702)
* No more C2

* Add test

* Various fixups

* Use ONNXCPU

* rm prints

* LFS pull

* Use sim docker

* Try sim docker again

* Print counter

* Make sure it can fail

* Fails correctly

* comments

* Add more install to opencl base docker

* vim not needed in base
2022-06-03 10:43:09 -07:00
HaraldSchafer
dc4d4f875b CL in docker (#24718)
* Move CL to base docker

* Different docker for cl

* add cl base docker

* add to tool

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-06-02 18:26:12 -07:00
Adeeb Shihadeh
afd16b2ade Create system/ for generic services (#24717)
* Create system/ for generic services

* logcatd joins the party

* fix those up
2022-06-02 17:02:25 -07:00
HaraldSchafer
c2b334acb5 Update README.md 2022-06-02 16:45:11 -07:00
Gijs Koning
b5aed2bf67 Simulator: Speed up process by removing second camera (#24679)
* simulator: support running wide camera only

* proper frame id

* use param name that makes more sense

* do some cleanup

* Update tools/sim/bridge.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-05-30 15:25:07 +02:00
Willem Melching
85b07bf3e8 sim no encoderd, move to BLOCK env variable 2022-05-30 11:49:15 +02:00
Adeeb Shihadeh
32a9ccfc37 visionipc python shim (#24660) 2022-05-25 20:49:56 -07:00
Adeeb Shihadeh
319f3d1475 move models to selfdrive/modeld/ (#24539)
* move models to selfdrive/modeld/

* two more refs
2022-05-15 17:29:09 -07:00
Adeeb Shihadeh
ab75c53792 replay: cleanup unused RGB buffers (#24537)
* replay: cleanup unused RGB buffers

* update replay cam

* little more
2022-05-14 19:55:12 -07:00
grekiki
17e33978cd Mypy fixes for --check-untyped-defs (#24372)
more type fixes
2022-05-12 14:08:11 +02:00
Gijs Koning
ee433dfa57 Simulator: Fix CI and set low_quality default (#24354)
* Change low_quality argument and fix closing carla bridge

* Some fixes

* Change carla process in test

* Change fov to 120, higher doesn't look good

* Update readme and remove redundant test

* update

* Add folder description
2022-04-29 07:15:05 -07:00
Gijs Koning
01968ca61b Simulator: Fix keyboard input (#24320)
* Fix keyboard input for simulator

* add unblock_stdout() to test

* Revert import change
2022-04-25 07:26:30 -07:00
Gijs Koning
9be23cbdb9 Simulator Tests (#24274)
* squash #24009

* Fix from other pr
Add low-quality arg

* Update tools/sim/test/test_carla_integration.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Updates for comments. Not finished yet

* commit

* fix arguments

* Final changes for comments

* Final fixes

* increase carla client timeout to 10

* make test executable

* actually wait for controlsd to send messages

* Error proof test. Starting up carla at each test and closing down using docker (tried many things).

* commit test carla

* Removed some time.sleeps
Add some more retries for bridge.

* Stop while loop on shutdown

* Increase teardown waiting time

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-04-22 18:00:49 +02:00
grekiki
b8b15d5cf1 mypy: enable --warn-unreachable (#24282)
* Optional solves mypy assuming None is always None

* oops

* spaces

* Update registration.py

* fix local error

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-04-21 18:27:45 +02:00
Gijs Koning
13254cef2f Add wide camera to Carla (#23989)
* Add c3 camera flag to bridge.py

* Set c3_cameras to default

* add runtime error message

* Remove c2 arg

* Update to 163 fov to not see through car

* update comment

* Update tools/sim/bridge.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>

* Revert camera.py changes

* Remove focal_length

* cleanup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-04-20 08:06:56 -07:00
Gijs Koning
e95a250bca Carla pip dependency and fix for git init (#24258)
* Add carla pip dependency for dev

* Revert other packages in pipfile

* Remove redundant carla install in docker

* Fix CI
Remove broken openpilot_build

* New run command
2022-04-20 05:23:27 -07:00
Adeeb Shihadeh
d1c3b7a20d sim: write params to enable in Dockerfile (#24113) 2022-04-04 09:05:20 -07:00
Adeeb Shihadeh
bb36a1c8b2 sim: add ignition toggling (#24043) 2022-03-25 14:17:45 -07:00
Jack Huang
db93275d87 CARLA: fix setting camera EOF (#24034)
* Fix Openpilot in Carla isn't accelerating

The scalars of the timestamp are different in real-world and simulation,
which will cause an infinite loop in selfdrive/modeld/modeld.cc.

* Set eof based on the frame ID

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* remove global

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-25 13:45:08 -07:00
Adeeb Shihadeh
8af20af66d pylint: enforce indentation (W0311) (#24039)
* pylint: enforce indentation (W0311)

* few more
2022-03-24 23:23:29 -07:00
Gijs Koning
3d8537ab23 Update carla script to easier install docker and nvidia-docker (#23986)
* Easier docker and nvidia-docker install in carla script

* Small cleanup

* cleanuo

* cleanup

* More comments

* Remove adding usergroup step
2022-03-18 14:07:39 -07:00
Gijs Koning
57b6fdc17a Rename RGB vision streams to match YUV streams (#23961)
* Renaming VISION_STREAM_RGB_.. to match yuv names like VISION_STREAM_ROAD
VISION_STREAM_RGB_BACK -> VISION_STREAM_RGB_ROAD
VISION_STREAM_RGB_FRONT -> VISION_STREAM_RGB_DRIVER

* little more

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-14 14:03:54 -07:00
Adeeb Shihadeh
36a3ec04be sim: fix bridge after default values removed from CANParser 2022-01-29 18:22:14 -08:00
Adeeb Shihadeh
fa3055f280 smaller docker image (#23469)
* save 2gb

* not used

* more cleanup

* little more

* wget too big

* follow

* needed for sim
2022-01-10 11:43:18 -08:00
Ewout ter Hoeven
332f568a82 Pyupgrade 3.6: Update syntax with Python 3.6+ features (#23305)
Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default

Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>

Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
2021-12-24 11:18:39 -08:00
Ewout ter Hoeven
55390d273f Convert format strings strings to f-strings (#23241)
* Convert all text strings to f-strings

Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.

Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.

F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale

* revert pyextra changes

* revert ublox.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-12-16 14:58:17 +01:00
Dean Lee
348d2d2b0d rename yuv streams (#23071)
* rename yuv streams

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-29 18:14:59 -08:00
Willem Melching
a4ca8e4835 sim: improve carla performance (#23046) 2021-11-28 11:32:37 +01:00
Adeeb Shihadeh
8160cf3c1b camerad: remove camera frame stream (#23045)
* camerad: remove camera frame stream

* fix release files
2021-11-27 21:58:21 -08:00
jimw
a58d272ae4 CARLA: send YUV and RGB over visionipc from bridge.py (#23012)
* CARLA: send YUV and RGB over visionipc

* CARLA: send YUV and RGB over visionipc-fix pipfile

* CARLA: send YUV and RGB over visionipc-Camerad class

* relock pipfile

* small bridge cleanup

* use tici camera resolution

* update vof

* HUD_SETTING has no counter

* no loggerd

Co-authored-by: jwolffe <wolffja@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-26 16:58:25 +01:00
Adeeb Shihadeh
45ced84acf sim: fix CAN error and block loggerd 2021-11-13 12:21:24 -08:00
Adeeb Shihadeh
e556d3d3d3 sim: set fingerprint with environment variable (#22679) 2021-10-24 21:59:50 -07:00
jimw
26c5e7b826 sim: send peripheralState message (#22541)
* controlsd: ignore peripheralState for Simulation

* controlsd: use fake peripheralState for Simulation

* controlsd: use fake peripheralState for Simulation

* controlsd: use fake peripheralState for Simulation

* Apply suggestions from code review

* sim: send peripheralState message

* sim: send peripheralState message

* sim: send peripheralState message

* sim: send peripheralState message

Co-authored-by: wolffja <wolffja@ubuntu20.04LTS>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-13 17:16:56 -07:00
xia0long
a3c26a912a sim: update CARLA to 0.9.12 (#22497)
* bump carla

* update dockerfile

* no need

* specify version

* some fixups

* fix start_carla

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-10 15:54:47 -07:00
Adeeb Shihadeh
04271fef55 improve sim readme 2021-10-10 15:50:30 -07:00
Robbe Derks
91987f38d4 Make pandaState and safetyMode a list (#22454)
* wip: move to pandaStates

* bump cereal

* wip: SafetyMode struct

* move to safetyMode

* fix typo

* this can be None

* fix potential empty pandaStates list

* fix thermald

* fix controlsd

* rename safetyModes to safetyConfigs

* update process_replay

* fix test_models

* bump cereal
2021-10-08 17:54:34 +02:00
Adeeb Shihadeh
5b641379ae phonelibs -> third_party (#22477)
* git mv to third_party

* find and replace

* fix release tests

* update pre-commit

* update tici bins

* update eon bins

Co-authored-by: Comma Device <device@comma.ai>
2021-10-07 16:32:44 -07:00
Adeeb Shihadeh
59c47f0334 sim: build openpilot with frame stream camera 2021-10-07 11:31:49 -07:00