Commit Graph

66 Commits

Author SHA1 Message Date
Adeeb Shihadeh
fcbce3d8f6 cleanup pedal crc
old-commit-hash: 23e8ad73979735479131dfb303e249b861829468
2024-03-20 10:35:33 -07:00
Adeeb Shihadeh
3bf3f4bf78 remove pedal (#31903)
* remove pedal

* bump panda

* fix

* update refs
old-commit-hash: fa12a6722868d436f15bea31537df1277bcc4027
2024-03-17 22:42:49 -07:00
Michel Le Bihan
a036e6e043 Simulator: Add world status reporting (#31740)
old-commit-hash: b4c8e0834d23e757d37b7157dc23eac3ed655bdf
2024-03-06 19:16:21 -08:00
Michel Le Bihan
fd4ee6f1c5 Only print keyboard help on poll start and unknown command (#31710)
old-commit-hash: 32fb58656a46dc428ec43f04f396aee994efd14e
2024-03-05 10:36:01 -08:00
Michel Le Bihan
07ad9f9644 Add simple MetaDrive scenario (#31686)
old-commit-hash: 87a9445d565fd909a94f19a478841490573c452e
2024-03-04 08:54:08 -08:00
Harald Schäfer
add26a5d1f GpsLocation: Rename accuracy to horizontal accuracy (#31629)
* Rename accuracy to horizontal accuracy

* typo in cereal
old-commit-hash: 85eb221e4c9344a5c135789691e8e0500aa51482
2024-02-28 19:55:57 -08:00
Cameron Clough
9bd90112d0 use pyupgrade to update to new typing syntax (#31580)
* add pyupgrade hook

* run pyupgrade (pre-commit run -a)

* ruff --fix

* Revert "add pyupgrade hook"

This reverts commit 56ec18bb6b8602a0b612f3803d96cdad14b52066.

* revert changes to third_party/

* manual type fixes

* explicit Optional wrapping capnp objects
old-commit-hash: 995250ae4967943ee33a3699a1d89a7a770d95e9
2024-02-24 16:41:23 -08:00
Justin Newberry
edef8ed522 Simulator: simulate the obd enabled/changed dance (#31519)
obd dance
old-commit-hash: a51ef41cf87c5a8b2eaa5301911051a9d5a8d00c
2024-02-20 12:11:42 -08:00
Justin Newberry
c3551ea4ec Simulator: fix keyboard ctrl messing with pytest (#30827)
fix
old-commit-hash: a6b17fb1f6063835f6e0065d9bf670fbf069de48
2023-12-20 15:10:11 -08:00
Justin Newberry
a3eafc8cd5 Simulator: only send camera frames at rate that they are generated (#30802)
only send frames at rate that they are generated
old-commit-hash: 8017c25f0b2960db13df22295c077fbbd6aa6a07
2023-12-19 10:45:07 -08:00
Justin Newberry
ba865f4580 Simulator: fix safety param (#30738)
fix param
old-commit-hash: 977dd033c4b2003c06978eed391e744ed06ea8f9
2023-12-14 19:34:06 -08:00
Kacper Rączy
f10d6d5738 metadrive: fix wasd steer signs (#30623)
* Swap AD signs

* Fix type annotation

* fix user torque

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
old-commit-hash: 43e1409fd2fa4a92350a54434602b71b1874fd60
2023-12-12 14:09:07 -08:00
Justin Newberry
9ef90e214d Simulator: remove carla (#30690)
* no carla

* no arg and stylize metadrive
old-commit-hash: 11ec5bf25e82e53bbefa88643c81ab5b7581e913
2023-12-11 20:38:37 -08:00
Shane Smiskol
f5d1c4f371 ruff: check newline (#30668)
* check newline

* nothing catches this
old-commit-hash: 97da129e11e58b07d5d136093827cd1c62311fea
2023-12-09 13:24:18 -08:00
Justin Newberry
8c21642780 simulator: set valid flags (#30656)
sim set valid
old-commit-hash: bb9dda976405d62ceb9e366011dbf57c665bfc42
2023-12-08 16:31:30 -08:00
Logan Lasiter
4f1ed42285 adding --local-partial-types mypy opt (#30491)
old-commit-hash: 5b2bcf6bf220f88e11978e04a77226127b520efb
2023-11-18 22:47:11 -08:00
Justin Newberry
db839e887d Simulator: blinkers and lane changes (#30107)
blinkers and lane changes
old-commit-hash: ba90bdf7d9c2d436be33ac7def0ab02d535efe73
2023-09-29 16:32:45 -07:00
Justin Newberry
dc0babfae4 Simulator: update documentation for metadrive (#30002)
* update sim docs

* update docs
old-commit-hash: 84609f365ba56f6d835fe04a8ea11f116892b5ec
2023-09-29 12:44:12 -07:00
Justin Newberry
8dcd04e702 Metadrive: move to a separate process (#30103)
* split bridge into two files

* fix metadrive

* wip

* fix tests too

* separate process

* sepeprate process

* finish moving to another process

* remove spammy output
old-commit-hash: 9d3dbd245ab39a2893d61759e4ef6b50ab42a463
2023-09-29 11:45:14 -07:00
Justin Newberry
078efeb3c2 Simulation: engage on startup, print help message (#30044)
old-commit-hash: 2792e5f2db33bd955d327545e6fba30ae2826ee0
2023-09-27 07:21:46 -07:00
Justin Newberry
0673347b3e Simulator: add reset hotkey (#29995)
add sim reset
old-commit-hash: 0857f4bb85e166da5858820321d2e1e1caef7dff
2023-09-20 17:28:41 -07:00
Justin Newberry
a79bfe13bf Simulator: add metadrive as optional simulator (#29935)
* Add metadrive sim

* use monotonic

* don't use cuda if it's not available

* Cleanup metadrive patches

* PR suggestions

* fix typo
old-commit-hash: e02519bb71beb4bf1f6b7f5def5a077886e00327
2023-09-20 10:35:57 -07:00
Justin Newberry
6d0672632b Simulator: fix controlsd mismatch (#29976)
fix controls mismatch
old-commit-hash: bee40de70312b892c50f7872e795977dec7f740f
2023-09-19 12:51:54 -07:00
Justin Newberry
27cacb51d4 Simulator: cleanup in preparation for metadrive (#29903)
* sim bridge cleanup

* fix carla

* remove that exception

* pr cleanup

* update car in a thread

* more cleanup

* import sorting

* handle exits better
old-commit-hash: 7f6718a7cb87909305fd6f23a614db926d225915
2023-09-15 14:02:09 -07:00
Justin Newberry
c4f322ce2d Linter: remove pylint (#29611)
remove pylint
old-commit-hash: 1ee6ed4b16e2ade0dd887c0687243aee769043e5
2023-08-24 16:30:54 -07:00
Adeeb Shihadeh
16ec56398c add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
old-commit-hash: a9626f95b69af19306143fc4def02fb5769405d2
2023-08-20 20:49:55 -07:00
Shane Smiskol
a9611d13be simulator: fix CANParser input args (#29343)
* we weren't testing?

* fix
old-commit-hash: 84fbf1c2e92d2799f193213f71987f1d6e8b6431
2023-08-11 14:12:33 -07:00
Harald Schäfer
cbe8057c55 Fix CARLA simulation (#28541)
* logmessaged conflicts with onnxrunner

* More fixes, now engages

* Fix can properly

* Otherwise it faults

* Put check back

* remove more hacks

* remove more hacks

* Not relevant anymore

* Narrow camera default
old-commit-hash: c5c9d5b92107ed59f3fb70a356f82b3cbe0b3da9
2023-06-13 22:54:37 -07:00
Adeeb Shihadeh
18b4b1e73e remove old tools script
old-commit-hash: 49044b5399710511cb2541faadb17109ceb66485
2022-08-07 17:10:14 -07:00
Adeeb Shihadeh
04af978260 let can packer handle counter (#25240)
* let can packer handle counter

* diff is expected

* update refs

* clean that up

* bump opendbc

* fix sim
old-commit-hash: 0ca62bf7df0fe81829c744fd8689c9b97cb6a36b
2022-07-21 20:54:53 -07:00
Adeeb Shihadeh
f06bb9d5f2 CANParser: invalid until valid (#24945)
* CANParser: invalid until valid

* bump opendbc

* bump opendbc

* fix counter in sim
old-commit-hash: 569a39ff768ff1704bbf478719253b365070c98f
2022-06-22 15:38:38 -07:00
Maxime Desroches
9a003e9b29 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>
old-commit-hash: 5add0c6159db3810c17f0b27afd3dda882f95586
2022-06-11 15:32:12 -07:00
Gijs Koning
d0fc9afa48 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
old-commit-hash: ee433dfa57a60364423a222a7f18dc137b77f532
2022-04-29 07:15:05 -07:00
Adeeb Shihadeh
0c9aa1570b sim: add ignition toggling (#24043)
old-commit-hash: bb36a1c8b2136ef556613abddaca308a05d54295
2022-03-25 14:17:45 -07:00
Adeeb Shihadeh
bd71c594a2 pylint: enforce indentation (W0311) (#24039)
* pylint: enforce indentation (W0311)

* few more
old-commit-hash: 8af20af66ddaa6bc06d7f72f9134aa9afeed3ed8
2022-03-24 23:23:29 -07:00
Adeeb Shihadeh
05ba2a5866 sim: fix bridge after default values removed from CANParser
old-commit-hash: 36a3ec04bec98f6b61ada90cdda692dc6fdc0416
2022-01-29 18:22:14 -08:00
Ewout ter Hoeven
a962365292 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>
old-commit-hash: 55390d273f36f49da3896e687ac5530f40c1d150
2021-12-16 14:58:17 +01:00
jimw
cf29eacca4 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>
old-commit-hash: a58d272ae4afa11624220b9392295ad6659db1df
2021-11-26 16:58:25 +01:00
Adeeb Shihadeh
17b51d3fd8 sim: fix CAN error and block loggerd
old-commit-hash: 45ced84acf9d0c8fcb5d37a9be82f81b5ff59479
2021-11-13 12:21:24 -08:00
Adeeb Shihadeh
fc4b12c05c sim: set fingerprint with environment variable (#22679)
old-commit-hash: e556d3d3d3bf6a0cdc588abbae57b256aace0351
2021-10-24 21:59:50 -07:00
orphen
b433129fd6 fix: sim: gracefully shutdown the bridge (#21413)
old-commit-hash: 325cabd4da786dae7f74558d2f41aaf1d471abaf
2021-06-29 13:45:34 -07:00
HaraldSchafer
34ca4a1a29 Simplify longitudinal tests (#21337)
* first pass

* passes!

* little more cleanup

* little more

* fix sim

* remove more plot stuff

* fix crash check

* fcw

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 234971203bbad057d85a61267e6ac7f2432394d6
2021-06-24 21:03:18 -07:00
Josh Smith
2cae3a3799 Add type hints, small cleanups (#21080)
* improve tools.lib.kbhit and tools.sim.lib.keyboard_ctrl

* unpack more efficiently

* minor improvements

* agnos.py match spec better

* manual_ctrl test missing queue arg

* fix incorrect type annotation

* queues are generic

* varname reuse resulting in incorrect type inference

* bytes().hex() rather than bytes.hex(bytes())

* a bit of type hinting stuff
old-commit-hash: 77321dbac4ebfedf9cb5e9085e16055346299749
2021-06-03 12:21:04 +02:00
Cameron Reikes
78ae1be356 Set standstill bit in sim (#20921)
old-commit-hash: 12ce8222529985948fb4bc985e0c2e545eb21ad6
2021-05-15 21:09:17 -07:00
iejMac
e8326f2555 minor bug fixes in sim (#20286)
* order doensn't matter

* order doensn't matter

* minor fixes

* minor fixes

* not blocking ctrl-c

* removing weather params

* removing type ignore
old-commit-hash: 072cdcad6bedcf54d94fa8c73d5e6809b8469a3b
2021-03-09 19:52:43 -08:00
Adeeb Shihadeh
af95c26b26 remove gpsd (#20027)
old-commit-hash: fe7f3f0ec6b66e42b26451e180e3cde241e749bb
2021-02-10 16:39:39 -08:00
Marcos S
059bddf7fc Carla fixes (#19824)
* 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: c03a95f7f92ab3eda7fe3b3db9776062aae0cbac
2021-01-18 17:16:32 -08:00
Adeeb Shihadeh
d4bf764d99 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 <willem.melching@gmail.com>
old-commit-hash: cc1bca542d8a12acc381fc3d284d37b57b12c6ee
2020-11-18 13:10:37 -08:00
Vivek Aithal
db0a4ef2dc dockerize carla + openpilot (#2011)
* dockerize carla + openpilot

* separate dockerfile

* bring back CI dockerfile

* cleanup bridge

* add op docker build and start script

* build container in CI

* fix camerad hack

* remove most magic numbers from bridge.py

* openpilot-sim docker build and run scripts

* fix dmonitoring hacks

* revert controlsd hacks

* clean up build scripts

* singular

* fix path

* fix image name

* modify sim readme

* sim readme and start script changes

* dockerfile with working opengl

* working opengl + passing panda build_st in docker

* fix bug in sim docker file

* bugfix sim docker file

* bugfix all op-sim docker issues

* modify readme + run script

* IT DRIVES

* clean this up

* more cleanup

* cleanup docker stuff

* more cleanup

* start with openpilot-base

* install carla python package

* Script is not in lib

* chmod

* everything should be running in docker now, the code may not be nice though

* works locally...

* rhdChecked is deprecated

* Checkout using git lfs when building sim container

* try to pass the tests

* pull latest docker

* gps should not throw an error on openpilot launch in bridge.py

* fixed a coding style error

* Only start ubloxd in car

* fixed more style problems

* revert typo

* Use enviromental variable to prevent errors in a simulator

* Remove unused import

* Attempt to fix missing enviromental variable

* fix typo

* less work for users, auto tmux engagement

* less work for users, auto tmux engagement

* fix check for nvidia

* clean up nvidia check

* remove typo, shorted dockerfile

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Bruce Wayne <batman@workstation-eu-gregor.eu.local>
Co-authored-by: Gregor Kikelj <gregor1234567890@gmail.com>
old-commit-hash: c5dfbe7a72c6f31a0aa3a32b6df3f81409b40faf
2020-09-10 12:14:49 +02:00
Adeeb Shihadeh
a93f0b069a fix counter mismatch in sim
old-commit-hash: 20162f7a4a1d1054e816a67735b3a2cebf5498b9
2020-08-06 13:23:20 -07:00