Commit Graph

166 Commits

Author SHA1 Message Date
Justin Newberry
5af5469c66 Simulator: split bridge and world into two files (#30091)
* split bridge into two files

* fix metadrive

* fix tests too
2023-09-28 17:50:01 -07:00
Justin Newberry
2792e5f2db Simulation: engage on startup, print help message (#30044) 2023-09-27 07:21:46 -07:00
Justin Newberry
09325b01ff Simulator: Looping metadrive world (#30068) 2023-09-27 07:20:54 -07:00
Justin Newberry
f18d66fa3e Simulator: cleanup old common stuff (#30069)
cleanup
2023-09-26 17:05:46 -07:00
Justin Newberry
98451611be Simulator: fix metadrive tick frequency (#30043)
sim rate fix
2023-09-25 16:28:09 -07:00
Justin Newberry
51674f61c1 Simulator: passthrough BLOCK on launch script (#30040)
sim block passthrough
2023-09-25 13:44:26 -07:00
Justin Newberry
2132e2358d Simulator: improve carla experience (#29996)
* wip

* carla improvments

* reset that
2023-09-21 10:38:06 -07:00
Justin Newberry
0857f4bb85 Simulator: add reset hotkey (#29995)
add sim reset
2023-09-20 17:28:41 -07:00
Justin Newberry
1f8ceb4ca1 Simulator: fix port issues in devcontainer (#29977)
* fix sim devcontainer

* use host.docker.internal instead

* devcontainer supports jsonc
2023-09-20 16:34:29 -07:00
Justin Newberry
e02519bb71 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
2023-09-20 10:35:57 -07:00
Justin Newberry
bee40de703 Simulator: fix controlsd mismatch (#29976)
fix controls mismatch
2023-09-19 12:51:54 -07:00
Justin Newberry
7f6718a7cb 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
2023-09-15 14:02:09 -07:00
Justin Newberry
a95c896b5f Simulator: launch simulator from any directory (#29910)
launch sim from any directory
2023-09-13 18:47:39 -07:00
Justin Newberry
a774809fdb Sim: fix openpilot directory (#29754)
fix simulator
2023-09-01 16:02:57 -07:00
Justin Newberry
7a4eaeaf9f bump submodules (#29705)
* bump submodules

* bump rednose

* fix dockerfiles
2023-08-29 17:02:38 -07:00
Justin Newberry
5716dfc9b5 CI: fix sim/docs scons cache invalidation (#29639)
* fix sim and docs images

* fix that

* that's a weird issue

* exists should work fine

* as little diff as possible
2023-08-27 19:52:38 -07:00
Justin Newberry
c46965fc27 CI: use local scons cache instead of building a separate image (#29634)
* use local

* added ci_sim

* revert scons

* dont need these anymore

* same for sim

* fix dockerfiles
2023-08-25 16:06:17 -07:00
Justin Newberry
1ee6ed4b16 Linter: remove pylint (#29611)
remove pylint
2023-08-24 16:30:54 -07:00
Justin Newberry
197460e061 CI: use scons cache mount for building simulator and docs (#29436)
* build docker image with scons cache

* use setup

* scons cache

* added the dockerfile

* add the shell

* docs use cache

* dont pull lfs for docs

* simulator too

* dont pull the cache image

* fix inputs

* inputs

* booleans aren't supported

* bool not supported

* bool isnt supported

* fix

* readonly cache

* fix sim cache too

* respect readonly

* gitignore and move to correct folder

* also copy old

* move to tools/ci

* move to selfdrive/test

* just make the cache writable, it's discarded anyway

* minimize diff in this pr
2023-08-21 15:11:31 -07:00
Adeeb Shihadeh
a9626f95b6 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
2023-08-20 20:49:55 -07:00
Shane Smiskol
84fbf1c2e9 simulator: fix CANParser input args (#29343)
* we weren't testing?

* fix
2023-08-11 14:12:33 -07:00
Justin Newberry
cf64b27168 Linter: Fix >160 line length test (#29287)
* test

* fix line length

* fix line length

* fix file size

* revert poetry

* cleanup for PR
2023-08-08 17:13:35 -07:00
nathanoy
3fca1b4f8d Updated Carla to version 0.9.14 (#29210) 2023-08-02 08:41:36 -07:00
Harald Schäfer
c5c9d5b921 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
2023-06-13 22:54:37 -07:00
Dean Lee
4ae0378f63 automatically detect available camera streams (#27640)
* remove WideCameraOnly

* check in set_initial_state

* no block

* remove try block

* apply reviews
2023-06-12 13:40:43 -07:00
Adeeb Shihadeh
d5ab1e33c2 scons: set warnings as error (#28004)
* navd: fix scons build warnings

* fix release

* sim fix

* fix docs

* build cabana
2023-04-22 15:24:45 -07:00
grekiki
202eb06a05 Carla simulator: set driver orientation (#27363) 2023-02-16 14:51:25 -08:00
Adeeb Shihadeh
cd8e03d53e move all third party stuff into third_party/ (#26853)
* mv fastcluster

* move msm_kgsl.h

* camerad include

* update path

* mv pyextra

* fix tici build

* add acados_template to release build

Co-authored-by: Comma Device <device@comma.ai>
2022-12-31 21:00:50 -08:00
Hamid Ebadi
49ae806534 carla sim: fix accelerometer sensor data (#26794) 2022-12-20 13:45:06 -08:00
Adeeb Shihadeh
996a6c06d4 sim: disable micd (#26653) 2022-11-30 23:12:35 -08:00
James
67fb344146 Fixed typo in CARLA README.md (#26615) 2022-11-29 01:05:38 -08:00
Ricardo Nuno
d1cf31bced sim: add docker kill to openpilot docker (#26310)
add docker kill to openpilot docker
2022-11-01 08:09:47 -07:00
Rohit Bernard
9377448888 sim: Converting RGB frames to NV12 format in OpenCL (#26169)
* convert carla rgb frames to nv12

* code cleanup

* move kernel

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-10-29 13:20:37 -07:00
wjxjmj
dbdb3a02a8 Add ip and port arguments to /tools/sim/bridge.py (#26011)
* Add ip and port arguments

* Add descriptions of ip and port arguments

* Update README.md

* Update README.md

* prefer host/port options

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2022-10-11 14:16:40 -07:00
Adeeb Shihadeh
01d05f66fe auto-detect pigeon or quectel (#25991)
* auto-detect pigeon or quectel

* persistent

* fix sim

* fix process replay

* fix locationd unit tests

* fix that

Co-authored-by: Comma Device <device@comma.ai>
2022-10-06 16:46:15 -07:00
Shane Smiskol
e7805eb5c5 FPv2: fixed fingerprint overrides query result (#25990)
* query FW versions if fixed (override after)

* skip here

* also skip here

* and here
2022-10-06 15:24:52 -07:00
Adeeb Shihadeh
5d33199905 sim: fix sensor freq and timestamps (#25937)
* sim: fix sensor freq and timestamps

* 100hz

* fix that too
2022-09-29 22:36:09 -07:00
Kurt Nistelberger
29d3ed2ce6 Sensor events splitup (#25714)
* PoC of reading sensors via interrupts instead of polling

* add Gyro and draft for magn

* add more functionality to gpio.cc

* change LSM gyro to interrupt

* resolve rebase conflict

* update BMX accel interrupt impl

* add interrupt collector thread to fetch in parallel

* change get_event interface to return true on successful read

* update BMX gyro interrupt impl

* update gpio.h/.cc according to comments

* address comments, rename Edgetype enum

* Edgetype to EdgeType

* update sensor interrupt interface

* add error handling, and read fd on trigger

* avoid sending empty messages

* fix build

* use gpiochip

* less diff

* gpiochip on both edges, but skip falling edge if rising edge is detected

* init last_ts with 0

* update sensord testcases

* update sensord testsweet

* test for pipeline

* readd with_process

* add null check

* move tests update to seperate PR

* sensord: improve test coverage (#25683)

* update sensord-interrupt testsweet

* address review comments

* inc stddev threshold

* fix format string

* add version 0 check again

* relax strictness after c3 with bmx tests

* relax strictness after tests

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>

* address PR comments

* fix typo

* remove 4ms limit, and skip first 0.5sec of data

* revert disable_interuppt change to destructor

* fix and remove timing skip

* make gpiochip generic

* sensord port

* change from sensorEvents to separated events

* fix gyro usage

* add splitted sensor tests

* modify debug script sensor_data_to_hist.py

* refactor get_event interface to remove sensorEvent message type

* update locationd to non sensorEvent usage

* tmp commit

* fix replay

* fix accelerometer type

* fix sensor to hist debug script

* update sensord tests to split events

* remove rebase artifacts

* port test_sensord.py

* small clean up

* change cereal to sensorEvents-splitup branch

* upate sensorEvents in regen

* fix route generation for splitted sensor events

* regen cleanUp from sensorEvents change

* .

* remove light and temp from locationd

* add generic init delay per sensor

* .

* update routes

* move bmx gyro/accel to its own channel

* adopt sensor tests to bmx channel

* remove rebase artifacts

* fix sensord test

* handle bmx not present

* add bmx sockets to regen

* .

* .

* code cleanUp

* .

* address PR comments

* address PR comments

* address PR comments

* lsm clean up

* readd sensorEvents

* rever regen.py

* .

* update replay refs

* move channels

* fix artifact

* bump cereal

* update refs

* fix timing issue

Co-authored-by: Bruce Wayne <batman@workstation-eu-intern2.eu.local>
Co-authored-by: gast04 <kurt.nistelberger@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-09-29 14:31:54 -07:00
Adeeb Shihadeh
6590fb2b93 pre-commit: add codespell (#25571) 2022-08-30 11:20:55 -07:00
Adeeb Shihadeh
90a4565eb2 params: make python and c++ API match (#25573)
* params: make python and c++ API match

* few more
2022-08-26 20:46:19 -07:00
Cameron Clough
f65547fbe2 sim: fix gps message (#25521)
fix gps timestamp field renamed

bug introduced in https://github.com/commaai/cereal/pull/341
2022-08-22 16:23:36 -07:00
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