Commit Graph

41 Commits

Author SHA1 Message Date
Jason Wen f837b5b40f Carcontroller: consolidate can sends method imports (#29695)
* Carcontroller: consolidate can sends method imports

* fix

* ruff
old-commit-hash: 7fbb7254fa13e0f219a1d8cd2d32c71388e93eb0
2023-08-29 10:51:50 -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
Cameron Clough 9741ecfe0f Ford: align car groups with convention
no plural

old-commit-hash: e7c858d590f84c4f476ec0a01eae67f49f7a114b
2023-07-18 11:42:15 +01:00
Cameron Clough c40c24e18d Ford: show FCW alert on IPC (#27924)
* Ford: show FCW alert on IPC

* forward fcw from ipma

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 47f948c5c6a81d229d9ab74183f4bfe9fe8dc9fb
2023-06-28 16:22:53 -07:00
Cameron Clough 1befc68287 Ford: detect auxiliary panda (#28491)
old-commit-hash: 30c12e45575d94563ae85a79e19823e9120ef76b
2023-06-10 23:22:12 -07:00
Cameron Clough 8ddf02e69b Ford: fix counter in LateralMotionControl2 message (#28328)
old-commit-hash: de5e0d0c714ce8820c5bbd9dc7e981cc8f58bb03
2023-05-27 21:54:37 -07:00
Shane Smiskol 18cabb533a Ford: longitudinal clean up (#28231)
clean ups
old-commit-hash: c7d3b28b93faa6c955fb24bc64031512ee985ee9
2023-05-18 14:30:07 -07:00
Cameron Clough ddcb2e67a5 Ford: improved ACC UI for OP long (#28114)
* Ford: improved ACC UI for OP long

- Show "stopped" status message on IPC when in standstill, similar to stock
- Prevent the distance control UI from appearing on button press (as
this does not influence OP long).

* set lead indicator and only override stock when OP is controlling long

* match DBC
old-commit-hash: 717bc04ddc330c43e794f28ee6ff3a287425112e
2023-05-14 00:20:34 +01:00
Cameron Clough 3e32b5cab1 Ford: cleanup long control and send stopping signal (#28110)
Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 4ee6c68ba5a61362481c8189f8a89e31fd09d390
2023-05-04 14:04:54 -07:00
Shane Smiskol c362125c21 Ford: curvature rate limit safety (#28059)
* bump panda

* add carcontroller

* add carcontroller

* cmt

* bumppanda

* ubmp
old-commit-hash: d8884004021987d249e91a9d05bbdad3aafefd30
2023-05-04 05:37:31 +00:00
Shane Smiskol 13efebaa7e Ford safety: curvature error limit (#27981)
* clip Ford requested curvature to current +- delta

* fix bug, allow for more limit

* bump panda to branch

* bump panda

* rename

* rename function

* make a wrapper function (ford uses dynamic up/down limits

* make two functions consistent

* use apply_dist_to_meas_limits

* only above 12 ms

* simplify, clean up

* this isn't used

* https://github.com/commaai/openpilot/pull/27446

* bump panda

* one m/s fudge

* fix current curvature

* also fix panda

* fix panda blocking msgs

* bump panda to fix more blocked msgs

* clip

* bump panda

* lower to 9 ms

* clean up carcontroller

* bump panda

* bump

* bumppanda

* bumppanda

* bumppanda

* split line
old-commit-hash: 8e3e9141ee74779a0ec49ca24c2ff938d686bb6f
2023-04-27 00:43:14 -07:00
Cameron Clough df939a2aa1 ford: correct messages frequencies (#28027)
* ford: correct messages frequencies

* fix STEER_STEP

* fix comment

* cleanup
old-commit-hash: 42f2e392130e99352f4d0c9ac317e2dae13a9fcf
2023-04-26 00:00:08 -07:00
Cameron Clough 3873169c9d ford: cleanup fordcan methods (#28026)
* fordcan: consistent naming

* fordcan cleanup
old-commit-hash: 49220985f434db79de1109625599ec7db0758d69
2023-04-25 18:15:56 -07:00
Shane Smiskol acc8e38111 GM: enforce steering command message timing (#27250)
* draft

* bump opendbc

* still draft

* that's not right

* superset of the changes, 33hz

* cleanup

* this should work

* remove line

* pass it in again

* actually no need to check updated now

* now_nanos

* consistent name

* fix replay

* one line isn't that bad

switch

switch

* fix CarController tests

* Update ref_commit
old-commit-hash: 8f5057ff2dbea4ebc85bc8f55bc7a37e4d5969b6
2023-02-09 15:37:39 -08:00
Cameron Clough 24718b7001 Ford CAN FD (#27166)
* add LateralMotionControl2 message

* send LatCtl2 message on CAN FD cars
old-commit-hash: df5ccda7315e7767465c61ebdee5e9cb30832bc9
2023-01-31 11:06:03 -08:00
Cameron Clough 1aeb66b58d Ford longitudinal control (#27161)
ford long
old-commit-hash: ef9deeb6eba3823982dadd485a3676441320226b
2023-01-30 22:37:54 -08:00
Shane Smiskol eb0dcd256e Ford: use curvature without roll compensation (#27110)
* Ford: use actuators.curvature

* ford is mathless
old-commit-hash: 701b7d89b65b6cf936ed6893de09c45f6c982ca4
2023-01-26 22:29:01 -08:00
Shane Smiskol 13e4e8230c Ford: set lateral ramp type to 0 (#27106)
set ramp type always to 0
old-commit-hash: 4f4f4afe8a9bca7fdaf70c2b05ef6e90263aaac8
2023-01-26 19:11:44 -08:00
Shane Smiskol 60922d4be0 Ford: use curvature signal for lateral control (#27091)
* do carcontroller

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* values done

* just send latActive in, cleaner

* Update selfdrive/car/ford/values.py

* fix a crash

* adjust ramp as well

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
old-commit-hash: 2bdce2d92ec859398aaa749037d1fa58d3b5eec7
2023-01-25 21:39:46 -08:00
Cameron Clough 71f40532f0 Ford cleanup (#27090)
* fordcan cleanup

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* no fordcan

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* more

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* these weren't even used in CS, follow rest of the brands

* we won't use this

* rename to more standard powertrain can bus

* no arguments for lka anymore

* Revert "rename to more standard powertrain can bus"

This reverts commit 0bc3f79f9bad2218c48a350bbf5ec6f726e0a028.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 3cd60a47244905c069de8bf0aa7a20b38b7ccb62
2023-01-25 20:21:14 -08:00
Shane Smiskol e66e4d8af2 Lateral jerk unit test (#25759)
* stash

* more test

* less test

* clean test

* no angle

* add tolerance

* fix gm

fix gm

* test both

* lower some rates on hkg

* stash

* simpler

* bump panda

* Revert "bump panda"

This reverts commit f2137c221145cca723fe6ee3378ba947b7061965.

* only torque

* make kona pass

* duplicate __init__

* move

* half clean up

* half clean up

* more clean up

* more clean up

* fix static analysis

* calculate over 0.5 seconds

* limit to max steer

* type annotation

* calc once
old-commit-hash: aab33b1c5f56eb7ef66f1128c98d45d5340ebc60
2022-12-15 21:52:07 -08:00
Cameron Clough 0defa2774f Ford: cleanup and fix button press (#26033)
* cleanup

* use Veh_V_ActlBrk for vEgoRaw

* remove unused CarState.yaw_data

* less resume spam

* set steering ramp rate

* match DBC range

* add LCA/TJA notes
old-commit-hash: 80259f377f8b1aa3a337cccbc3b00bd41898cf44
2022-10-12 14:23:12 -07:00
Adeeb Shihadeh 9d640eecd0 Ford Explorer 2020-21 (#25614)
* add model years

* update Focus steer ratio

* Ford: add EU label to Focus Mk4

* add packages

* add Ford Explorer 2020

Package: Co-Pilot 360 Assist+

Optional on XLT
Standard on Limited, Limited Hybrid, ST and Platinum

https://cdn.dealereprocess.org/cdn/brochures/ford/2020-explorer.pdf

* Ford: steering control with path angle

* Ford: add TJA toggle to buttons

* add Ford Explorer 2021

`62241b0c7fea4589|2022-08-30--11-58-24--0`

Package: Co-Pilot 360 Assist+

Optional on XLT
Standard on Limited, Limited Hybrid, ST and Platinum (same as 2020)

https://cdn.dealereprocess.org/cdn/brochures/ford/2021-explorer.pdf

* Ford: add shiftByWire ECU fw

* angle/steer refactor

* try always stop and go for US models

* no dashcam

* car info

* send resume button

* skip explorer

* escape and focus back in dashcam

* passthru buttons

* fordcan set bus for button message

* toggle off stock traffic jam assist so camera does not enforce driver presence checks

* not used

* update ramp rate/precision notes

* cleanup

* bump steering pressed torque to 0.8 Nm

* add standstill

* bump steer ratio

* try increasing delay?

* fix docs

* add kuga car info

* maybe fix tja toggle?

* compensate for ford roll compensation??

* oops

* better ui

* block non-adaptive

* add note on ui warning for hands on wheel

* try only checking/toggling TJA every 2 seconds

* add car test route

* dashcam only again

* send buttons to camera

* add process replay segment

* cleanup

* bump panda

* add extra FW

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
old-commit-hash: 9241de221099f6c65fd7ed5ed87d6296c17f668d
2022-09-08 15:49:51 -07:00
Adeeb Shihadeh 5263356958 remove CS.steeringRateLimited (#25251)
* remove CS.steeringRateLimited

* bump cereal

* update refs
old-commit-hash: d462a08056d54a957084d594286626a2509c94aa
2022-07-24 14:56:55 -07:00
Shane Smiskol 0d83812f86 Clean up CarControllers (#25008)
* do VW

* Do the rest

* unused

* ford cc formatting

* final clean ups

* also just return update output
old-commit-hash: d2c2154a32db0876036f4f6b61b912de0c90fc5a
2022-06-30 17:23:12 -07:00
Cameron Clough 0830dc0277 Ford: Support for LCA vehicles (#23331)
* Ford: add Focus Mk4

Also removes support for the Ford Fusion.

* Ford: LKAS/LCA steering and UI CAN commands

* Ford: implement CarController w/ steering and lanes ui

* Ford: FPv2 firmware request

* Ford: Add FW for 2018 Ford Focus

* Ford: add Escape Mk4

* bump panda

* cleanup

* add that back

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: acd455ed3ae0ffbb82fe36dd6d9a1f4d16279823
2022-04-14 14:32:03 -07:00
Dean Lee 98de810849 check in tuple instead of list (#23477)
* check in tuple instead of list

* Update selfdrive/car/toyota/carcontroller.py

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

* Update selfdrive/car/mazda/interface.py

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

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: a653461dec18b1313148905172ba54bac9f5fdfd
2022-01-10 16:36:51 +01:00
HaraldSchafer f64c2974b4 Road Roll Compensation Rebased (#23251)
* first commit

* update refs
old-commit-hash: cf466222f623df5fac325b86b71dc4e181b40d55
2021-12-16 17:34:12 -08:00
Willem Melching 7b3e330def Log actuators after applying rate limits in CarController (#23230)
* return actuators from carcontroller

* log it

* pass to latcontrol

* chrysler

* gm

* honda

* more brands

* rest of the brands

* gm cleanup

* hyundai cleanup

* update ref

* rename field

* fix subaru

* add types

* more subaru fixes #23240

* consistent whitespace

* bump cereal
old-commit-hash: 4f1eb4278a83a3abebebef67a081961e27594d90
2021-12-16 13:08:20 +01:00
Adeeb Shihadeh 691ea8553f deprecate CP.enableCamera (#21509)
* deprecate CP.enableCamera

* more removal

* one more

* update refs
old-commit-hash: c72d163e142d90edac5086892c0cd297bdc636fe
2021-07-07 14:59:18 -07:00
CrispinFlowerday 4f02e178db Subaru: show LDW on dash for correct lane (#20934)
* Emit correct alerts for LDW Left & Right on Subarus

This change switches the ldw event to use VisualAlert.ldw and
alters all cars to use the prior behaviour for that alert, except
global subarus - they emit the correct warning to the dash

* Remove whitespace, and add comment about not overwriting stock alerts

Co-authored-by: Crispin Flowerday <crispin@theflowerdays.com>
old-commit-hash: 7458e143e3c0123a95680b0b2db6c7a1f94405fa
2021-06-07 15:06:28 -07:00
wolterhv 56f48a03bc Replace hardcoded values for Pi (#20235)
* Avoid redefining pi, use instead math.pi or M_PI from math.h

* Revert overwriting of the gpsPi variable, which is part the GPS standard.

* Move standard library imports to top, remove standard library import comments.
old-commit-hash: 93911a7dbedcd06383cb9fea94ed78133442f687
2021-03-03 14:22:06 -08:00
Adeeb Shihadeh 05eb44115e cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
old-commit-hash: 312b681a46b8153314a8420611b6479dd6f70dfc
2021-02-16 21:39:32 -08:00
Adeeb 5e857427ba Enable more flake8 checks (#1602)
* enable some more flake8 checks

* some more quick ones

* bump opendbc

* e401

* e711 e712

* e115 e116

* e222

* e301

* remove that

* e129

* e701 e702

* e125 e131

* e227

* e306

* e262

* W503

* e713

* e704

* e731

* bump opendbc

* fix some e722
old-commit-hash: d9bf9f0a4036f55411f6dfbb438990a5eb7f4930
2020-05-30 20:14:58 -07:00
Adeeb 0468c42f22 Abstract CarInterface init (#1131)
* abstract CarInterface init

* unused

* subaru

* gm cleanup

* vw

* typo

* carcontroller

* more cleanup

* fix vw

old-commit-hash: 13f60eae91764a2cdc7405e323381dcf971b11c3
2020-02-19 20:37:07 -08:00
rbiasini f80b147fac Ford: have carstate update returning capnp struct directly (#1113)
* Before abstraction, adding speed init from VW as well

* strting to abstract carstate class

* fix bug and update lock?

* revert pipfile change

* another bug

* fix linter

* bug fix

* remove a bunch of diplicated kf code

* better to not have class vars. will abstract __init__ anyway later

* abstract common instance vars in carstate init and a generic gear parser static method

* abstract gear parser for chrysler

* abstract gm gear parser too

* remove unnecessary random vars

* Chrysler: carstate returns capnp struct directly

* revert ref commit

* test ref

* WIP

* more WIP

* ops, missed this conflict

* ford as well

* not sure why this got deleted

* no need to copy

* remove copy

* remove copy import

* remove unnecessary intermediate variable

* remove obsolete comments

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

old-commit-hash: bfa79153b4a6c25ec0e5960776f6f9773a7db7d0
2020-02-17 14:42:41 -08:00
George Hotz 9ef085076b selfdrive/car
old-commit-hash: 71ead9adea
2020-01-17 10:58:43 -08:00
George Hotz 81dd5a50cf root commit
old-commit-hash: 6c33a5c1f3
2020-01-17 10:02:52 -08:00
Vehicle Researcher 99b637c7ce openpilot v0.7 release
old-commit-hash: c025b96e8a
2019-12-13 13:03:08 -08:00
Vehicle Researcher 89d1d84c70 openpilot v0.6.5 release
old-commit-hash: cf80f7a28b
2019-10-09 18:43:53 +00:00
Vehicle Researcher dfe603c178 openpilot v0.6.4 release
old-commit-hash: 61229779e4
2019-09-09 23:03:02 +00:00