Merge remote-tracking branch 'upstream/master' into gm-fpv2-logging

pull/31221/head
Shane Smiskol 1 year ago
commit f9d7a7329b
  1. 6
      RELEASES.md
  2. 2
      launch_env.sh
  3. 3
      selfdrive/car/subaru/fingerprints.py
  4. 22
      selfdrive/car/subaru/values.py
  5. 11
      selfdrive/car/vin.py
  6. 4
      selfdrive/modeld/models/dmonitoring_model.current
  7. 4
      selfdrive/modeld/models/dmonitoring_model.onnx
  8. 4
      selfdrive/modeld/models/dmonitoring_model_q.dlc
  9. 6
      selfdrive/monitoring/driver_monitor.py
  10. 2
      selfdrive/test/process_replay/model_replay_ref_commit
  11. 24
      system/hardware/tici/agnos.json
  12. 6
      tools/lib/logreader.py
  13. 6
      tools/lib/tests/test_logreader.py

@ -1,10 +1,14 @@
Version 0.9.6 (20XX-XX-XX)
Version 0.9.6 (2024-02-XX)
========================
* New driving model
* Vision model trained on more data
* Improved driving performance
* Directly outputs curvature for lateral control
* New driver monitoring model
* Trained on larger dataset
* AGNOS 9
* comma body streaming and controls over WebRTC
* Improved fuzzy fingerprinting for many makes and models
* Hyundai Staria 2023 support thanks to sunnyhaibin!
* Kia Niro Plug-in Hybrid 2022 support thanks to sunnyhaibin!
* Toyota RAV4 2023-24 support

@ -7,7 +7,7 @@ export OPENBLAS_NUM_THREADS=1
export VECLIB_MAXIMUM_THREADS=1
if [ -z "$AGNOS_VERSION" ]; then
export AGNOS_VERSION="9.1"
export AGNOS_VERSION="9.3"
fi
export STAGING_ROOT="/data/safe_staging"

@ -451,6 +451,7 @@ FW_VERSIONS = {
b'\xa1 \x06\x02',
b'\xa1 \x07\x00',
b'\xa1 \x07\x02',
b'\xa1 \x07\x03',
b'\xa1 \x08\x00',
b'\xa1 \x08\x01',
b'\xa1 \x08\x02',
@ -460,6 +461,7 @@ FW_VERSIONS = {
(Ecu.eps, 0x746, None): [
b'\x1b\xc0\x10\x00',
b'\x9b\xc0\x10\x00',
b'\x9b\xc0\x10\x02',
b'\x9b\xc0 \x00',
],
(Ecu.fwdCamera, 0x787, None): [
@ -478,6 +480,7 @@ FW_VERSIONS = {
b'\xde,\xa0@\x07',
b'\xe2"`0\x07',
b'\xe2"`p\x07',
b'\xe2"`q\x07',
b'\xe3,\xa0@\x07',
],
(Ecu.transmission, 0x7e1, None): [

@ -137,6 +137,15 @@ CAR_INFO: Dict[str, Union[SubaruCarInfo, List[SubaruCarInfo]]] = {
CAR.ASCENT_2023: SubaruCarInfo("Subaru Ascent 2023", "All", car_parts=CarParts.common([CarHarness.subaru_d])),
}
LKAS_ANGLE = {CAR.FORESTER_2022, CAR.OUTBACK_2023, CAR.ASCENT_2023}
GLOBAL_GEN2 = {CAR.OUTBACK, CAR.LEGACY, CAR.OUTBACK_2023, CAR.ASCENT_2023}
PREGLOBAL_CARS = {CAR.FORESTER_PREGLOBAL, CAR.LEGACY_PREGLOBAL, CAR.OUTBACK_PREGLOBAL, CAR.OUTBACK_PREGLOBAL_2018}
HYBRID_CARS = {CAR.CROSSTREK_HYBRID, CAR.FORESTER_HYBRID}
# Cars that temporarily fault when steering angle rate is greater than some threshold.
# Appears to be all torque-based cars produced around 2019 - present
STEER_RATE_LIMITED = GLOBAL_GEN2 | {CAR.IMPREZA_2020, CAR.FORESTER}
SUBARU_VERSION_REQUEST = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \
p16(uds.DATA_IDENTIFIER_TYPE.APPLICATION_DATA_IDENTIFICATION)
SUBARU_VERSION_RESPONSE = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER + 0x40]) + \
@ -171,6 +180,10 @@ FW_QUERY_CONFIG = FwQueryConfig(
obd_multiplexing=False,
),
],
# We don't get the EPS from non-OBD queries on GEN2 cars. Note that we still attempt to match when it exists
non_essential_ecus={
Ecu.eps: list(GLOBAL_GEN2),
}
)
DBC = {
@ -190,12 +203,3 @@ DBC = {
CAR.OUTBACK_PREGLOBAL: dbc_dict('subaru_outback_2015_generated', None),
CAR.OUTBACK_PREGLOBAL_2018: dbc_dict('subaru_outback_2019_generated', None),
}
LKAS_ANGLE = {CAR.FORESTER_2022, CAR.OUTBACK_2023, CAR.ASCENT_2023}
GLOBAL_GEN2 = {CAR.OUTBACK, CAR.LEGACY, CAR.OUTBACK_2023, CAR.ASCENT_2023}
PREGLOBAL_CARS = {CAR.FORESTER_PREGLOBAL, CAR.LEGACY_PREGLOBAL, CAR.OUTBACK_PREGLOBAL, CAR.OUTBACK_PREGLOBAL_2018}
HYBRID_CARS = {CAR.CROSSTREK_HYBRID, CAR.FORESTER_HYBRID}
# Cars that temporarily fault when steering angle rate is greater than some threshold.
# Appears to be all torque-based cars produced around 2019 - present
STEER_RATE_LIMITED = GLOBAL_GEN2 | {CAR.IMPREZA_2020, CAR.FORESTER}

@ -16,7 +16,6 @@ def is_valid_vin(vin: str):
def get_vin(logcan, sendcan, buses, timeout=0.1, retry=3, debug=False):
addrs = [0x200] + list(range(0x7e0, 0x7e8)) + list(range(0x18DA00F1, 0x18DB00F1, 0x100)) # addrs to process/wait for
for i in range(retry):
for bus in buses:
# TODO: can you send to 0x7df on bolt?
@ -24,11 +23,10 @@ def get_vin(logcan, sendcan, buses, timeout=0.1, retry=3, debug=False):
(StdQueries.UDS_VIN_REQUEST, StdQueries.UDS_VIN_RESPONSE, STANDARD_VIN_ADDRS, 0x8),
(StdQueries.OBD_VIN_REQUEST, StdQueries.OBD_VIN_RESPONSE, STANDARD_VIN_ADDRS, 0x8)):
try:
query = IsoTpParallelQuery(sendcan, logcan, bus, addrs, [request, ], [response, ], response_offset=rx_offset,
debug=debug)
query = IsoTpParallelQuery(sendcan, logcan, bus, STANDARD_VIN_ADDRS, [request, ], [response, ], functional_addrs=FUNCTIONAL_ADDRS, debug=debug)
results = query.get_data(timeout)
for addr in vin_addrs:
for addr in STANDARD_VIN_ADDRS:
vin = results.get((addr, None))
if vin is not None:
# Ford pads with null bytes
@ -39,12 +37,13 @@ def get_vin(logcan, sendcan, buses, timeout=0.1, retry=3, debug=False):
if vin.startswith(b'\x11'):
vin = vin[1:18]
cloudlog.warning(f"got vin with {request=}")
return get_rx_addr_for_tx_addr(addr), bus, vin.decode()
cloudlog.error(f"vin query retry ({i+1}) ...")
except Exception:
cloudlog.exception("VIN query exception")
cloudlog.error(f"vin query retry ({i+1}) ...")
return -1, -1, VIN_UNKNOWN

@ -1,2 +1,2 @@
d1124586-761e-4e18-a771-6b5ef35124fe
6fec774f513a19e44d4316e46ad38277197d45ea
60abed33-9f25-4e34-9937-aaf918d41dfc
50887963963a3022e85ac0c94b0801aef955a608

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:517262fa9f1ad3cc8049ad3722903f40356d87ea423ee5cf011226fb6cfc3d5b
size 16072278
oid sha256:9a667cbde6eca86c5b653f57853e3d33b9a875bceb557e193d1bef78c2df9c37
size 16132779

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64b94659226a1e3c6594a13c2e5d029465d5803a5c3005121ec7217acdbbef20
size 4443461
oid sha256:f5729c457dd47f6c35e2a818eae14113526fd0bfac6417a809cbaf9d38697d9b
size 4488413

@ -29,10 +29,10 @@ class DRIVER_MONITOR_SETTINGS():
self._FACE_THRESHOLD = 0.7
self._EYE_THRESHOLD = 0.65
self._SG_THRESHOLD = 0.9
self._BLINK_THRESHOLD = 0.895
self._BLINK_THRESHOLD = 0.865
self._EE_THRESH11 = 0.275
self._EE_THRESH12 = 5.5
self._EE_THRESH11 = 0.241
self._EE_THRESH12 = 4.7
self._EE_MAX_OFFSET1 = 0.06
self._EE_MIN_OFFSET1 = 0.025
self._EE_THRESH21 = 0.01

@ -1 +1 @@
4b983afeba5ec953f0d37e7b3499bde5209728eb
4a01784a6b83a49301a68adf52bb7dcfcb7173b5

@ -1,9 +1,9 @@
[
{
"name": "boot",
"url": "https://commadist.azureedge.net/agnosupdate/boot-fd30f580375279ff4605034ec13711890a2b227205571a087cdc5226a2710275.img.xz",
"hash": "fd30f580375279ff4605034ec13711890a2b227205571a087cdc5226a2710275",
"hash_raw": "fd30f580375279ff4605034ec13711890a2b227205571a087cdc5226a2710275",
"url": "https://commadist.azureedge.net/agnosupdate/boot-1cc21f31a7c09772fd759e6f2a614974bf4f2fc320c91a799ffadd11abc1f85f.img.xz",
"hash": "1cc21f31a7c09772fd759e6f2a614974bf4f2fc320c91a799ffadd11abc1f85f",
"hash_raw": "1cc21f31a7c09772fd759e6f2a614974bf4f2fc320c91a799ffadd11abc1f85f",
"size": 15636480,
"sparse": false,
"full_check": true,
@ -11,9 +11,9 @@
},
{
"name": "abl",
"url": "https://commadist.azureedge.net/agnosupdate/abl-bb234733816781b3d09266f91f741436e9bf17e1a7caf468cf7d09ee788cef4a.img.xz",
"hash": "bb234733816781b3d09266f91f741436e9bf17e1a7caf468cf7d09ee788cef4a",
"hash_raw": "bb234733816781b3d09266f91f741436e9bf17e1a7caf468cf7d09ee788cef4a",
"url": "https://commadist.azureedge.net/agnosupdate/abl-eeb89a74c968a5a2ffce96f23158b72e03e2814adf72ef59d1200ba8ea5d2f39.img.xz",
"hash": "eeb89a74c968a5a2ffce96f23158b72e03e2814adf72ef59d1200ba8ea5d2f39",
"hash_raw": "eeb89a74c968a5a2ffce96f23158b72e03e2814adf72ef59d1200ba8ea5d2f39",
"size": 274432,
"sparse": false,
"full_check": true,
@ -61,17 +61,17 @@
},
{
"name": "system",
"url": "https://commadist.azureedge.net/agnosupdate/system-e1952bb363688c0f5c0646e39bcdfb45be25b5e2baed37d1ba7801aa1a3a9c98.img.xz",
"hash": "3b6cdf9bd881a5e90b21dd02c6faa923b415e32ecae9bfdc96753d4208fb82fe",
"hash_raw": "e1952bb363688c0f5c0646e39bcdfb45be25b5e2baed37d1ba7801aa1a3a9c98",
"url": "https://commadist.azureedge.net/agnosupdate/system-38402b90b65729f8a4feb729c8a862cdf306659a85f27431d3ff7e52d4027082.img.xz",
"hash": "5dc1718e21c49e4fa910fbb3b2321381f497b38335a0cf3ca923157d589abe89",
"hash_raw": "38402b90b65729f8a4feb729c8a862cdf306659a85f27431d3ff7e52d4027082",
"size": 10737418240,
"sparse": true,
"full_check": false,
"has_ab": true,
"alt": {
"hash": "2fb81e58f4bc6c4e5e71c8e7ac7553f85082c430627d7a5cc54a6bbc82862500",
"url": "https://commadist.azureedge.net/agnosupdate/system-skip-chunks-e1952bb363688c0f5c0646e39bcdfb45be25b5e2baed37d1ba7801aa1a3a9c98.img.xz",
"size": 4543090376
"hash": "1809e36d8e376e0a0c8348e3f684aba4100fe0382042c051efd0e946af1ce696",
"url": "https://commadist.azureedge.net/agnosupdate/system-skip-chunks-38402b90b65729f8a4feb729c8a862cdf306659a85f27431d3ff7e52d4027082.img.xz",
"size": 4077270244
}
}
]

@ -275,9 +275,11 @@ are uploaded or auto fallback to qlogs with '/a' selector at the end of the rout
def from_bytes(dat):
return _LogFileReader("", dat=dat)
def filter(self, msg_type: str):
return (getattr(m, m.which()) for m in filter(lambda m: m.which() == msg_type, self))
def first(self, msg_type: str):
m = next(filter(lambda m: m.which() == msg_type, self), None)
return None if m is None else getattr(m, msg_type)
return next(self.filter(msg_type), None)
if __name__ == "__main__":

@ -118,6 +118,12 @@ class TestLogReader(unittest.TestCase):
self.assertEqual(qlog_len1, qlog_len2)
@pytest.mark.slow
def test_helpers(self):
lr = LogReader(f"{TEST_ROUTE}/0/q")
self.assertEqual(lr.first("carParams").carFingerprint, "SUBARU OUTBACK 6TH GEN")
self.assertTrue(0 < len(list(lr.filter("carParams"))) < len(list(lr)))
if __name__ == "__main__":
unittest.main()

Loading…
Cancel
Save