Skip to content

Commit d8f42d6

Browse files
author
zhou jielei
committed
Merge remote-tracking branch 'upstream/master'
2 parents a49442c + 900cb87 commit d8f42d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+492
-214
lines changed

.github/ISSUE_TEMPLATE/misc.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Miscellaneous
2+
description: For tools or test bugs, or enhancements
3+
labels: ["bug"]
4+
body:
5+
6+
- type: markdown
7+
attributes:
8+
value: >
9+
* If the issue likely only affects your car model or make, go back and open a **car bug report** instead.
10+
Before creating a **miscellaneous bug report**, please check the following:
11+
* Ensure there isn't an existing issue for your bug. If there is, leave a comment on the existing issue.
12+
13+
- type: textarea
14+
attributes:
15+
label: Describe the bug or enhancement
16+
description: Also include a description of how to reproduce the bug or how the enhancement would work
17+
validations:
18+
required: true
19+
20+
- type: input
21+
id: route
22+
attributes:
23+
label: Provide a route where the issue occurs if applicable
24+
description: Ensure the route is fully uploaded at https://useradmin.comma.ai
25+
placeholder: 77611a1fac303767|2020-05-11--16-37-07
26+
27+
- type: input
28+
id: version
29+
attributes:
30+
label: openpilot version if applicable
31+
description: If you're not on release, provide the commit hash
32+
placeholder: 0.8.10
33+
34+
- type: textarea
35+
attributes:
36+
label: Additional info

.github/workflows/car_diff.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ jobs:
99
name: comment
1010
runs-on: ubuntu-latest
1111
timeout-minutes: 10
12-
continue-on-error: true
1312
permissions:
1413
contents: read
1514
pull-requests: write
1615
actions: read
1716
steps:
1817
- name: Wait for car diff
18+
id: wait
19+
continue-on-error: true
1920
uses: lewagon/wait-on-check-action@v1.3.4
2021
with:
2122
ref: ${{ github.event.pull_request.head.sha }}
@@ -24,6 +25,7 @@ jobs:
2425
allowed-conclusions: success
2526
wait-interval: 20
2627
- name: Download car diff
28+
if: steps.wait.outcome == 'success'
2729
uses: dawidd6/action-download-artifact@v6
2830
with:
2931
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -34,6 +36,7 @@ jobs:
3436
path: .
3537
allow_forks: true
3638
- name: Comment car diff on PR
39+
if: steps.wait.outcome == 'success'
3740
uses: thollander/actions-comment-pull-request@v2
3841
with:
3942
filePath: diff.txt

docs/CARS.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--- AUTOGENERATED FROM selfdrive/car/CARS_template.md, DO NOT EDIT. --->
22

3-
# Support Information for 385 Known Cars
3+
# Support Information for 387 Known Cars
44

55
|Make|Model|Package|Support Level|
66
|---|---|---|:---:|
@@ -19,6 +19,7 @@
1919
|Acura|TLX 2018-20|All|[Community](#community)|
2020
|Acura|TLX 2021|All|[Upstream](#upstream)|
2121
|Acura|TLX 2022-23|All|[Community](#community)|
22+
|Acura|TLX 2025|All|[Upstream](#upstream)|
2223
|Acura|ZDX 2024|All|[Not compatible](#can-bus-security)|
2324
|Audi|A3 2014-19|Adaptive Cruise Control (ACC) & Lane Assist|[Upstream](#upstream)|
2425
|Audi|A3 Sportback e-tron 2017-18|Adaptive Cruise Control (ACC) & Lane Assist|[Upstream](#upstream)|
@@ -114,6 +115,7 @@
114115
|Honda|N-Box 2018|All|[Upstream](#upstream)|
115116
|Honda|Odyssey 2018-20|Honda Sensing|[Upstream](#upstream)|
116117
|Honda|Odyssey 2021-26|All|[Upstream](#upstream)|
118+
|Honda|Odyssey (Taiwan) 2018-19|Honda Sensing|[Upstream](#upstream)|
117119
|Honda|Passport 2019-25|All|[Upstream](#upstream)|
118120
|Honda|Passport 2026|All|[Upstream](#upstream)|
119121
|Honda|Pilot 2016-22|Honda Sensing|[Upstream](#upstream)|
@@ -149,7 +151,7 @@
149151
|Hyundai|Kona Hybrid 2020|Smart Cruise Control (SCC)|[Upstream](#upstream)|
150152
|Hyundai|Nexo 2021|All|[Upstream](#upstream)|
151153
|Hyundai|Palisade 2020-22|All|[Upstream](#upstream)|
152-
|Hyundai|Palisade 2023-24|HDA2|[Community](#community)|
154+
|Hyundai|Palisade 2023-24|Highway Driving Assist II|[Community](#community)|
153155
|Hyundai|Santa Cruz 2022-24|Smart Cruise Control (SCC)|[Upstream](#upstream)|
154156
|Hyundai|Santa Fe 2019-20|All|[Upstream](#upstream)|
155157
|Hyundai|Santa Fe 2021-23|All|[Upstream](#upstream)|
@@ -208,7 +210,7 @@
208210
|Kia|Stinger 2018-20|Smart Cruise Control (SCC)|[Upstream](#upstream)|
209211
|Kia|Stinger 2022-23|All|[Upstream](#upstream)|
210212
|Kia|Telluride 2020-22|All|[Upstream](#upstream)|
211-
|Kia|Telluride 2023-24|HDA2|[Community](#community)|
213+
|Kia|Telluride 2023-24|Highway Driving Assist II|[Community](#community)|
212214
|Lexus|CT Hybrid 2017-18|Lexus Safety System+|[Upstream](#upstream)|
213215
|Lexus|ES 2017-18|All|[Upstream](#upstream)|
214216
|Lexus|ES 2019-25|All|[Upstream](#upstream)|

opendbc/car/chrysler/radar_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def update(self, can_strings):
7373
if 'LONG_DIST' in cpt: # c_* message
7474
self.pts[trackId].dRel = cpt['LONG_DIST'] # from front of car
7575
# our lat_dist is positive to the right in car's frame.
76-
# TODO what does yRel want?
77-
self.pts[trackId].yRel = cpt['LAT_DIST'] # in car frame's y axis, left is positive
76+
# LAT_DIST is right-positive, yRel is left-positive
77+
self.pts[trackId].yRel = -cpt['LAT_DIST'] # in car frame's y axis, left is positive
7878
else: # d_* message
7979
self.pts[trackId].vRel = cpt['REL_SPEED']
8080

opendbc/car/extra_cars.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ class CAR(Platforms):
5555

5656
EXTRA_HYUNDAI = ExtraPlatformConfig(
5757
[
58-
CommunityCarDocs("Hyundai Palisade 2023-24", package="HDA2"),
59-
CommunityCarDocs("Kia Telluride 2023-24", package="HDA2"),
58+
CommunityCarDocs("Hyundai Palisade 2023-24", "Highway Driving Assist II"),
59+
CommunityCarDocs("Kia Telluride 2023-24", "Highway Driving Assist II"),
6060
],
6161
)
6262

opendbc/car/honda/carstate.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def __init__(self, CP):
4848
# When available we use cp.vl["CAR_SPEED"]["ROUGH_CAR_SPEED_2"] to populate vEgoCluster
4949
# However, on cars without a digital speedometer this is not always present (HRV, FIT, CRV 2016, ILX and RDX)
5050
self.dash_speed_seen = False
51+
self.is_metric = False
52+
self.v_cruise_factor = 1.
5153

5254
def update(self, can_parsers) -> structs.CarState:
5355
cp = can_parsers[Bus.pt]
@@ -68,7 +70,8 @@ def update(self, can_parsers) -> structs.CarState:
6870
self.cruise_buttons = cp.vl["SCM_BUTTONS"]["CRUISE_BUTTONS"]
6971

7072
# used for car hud message
71-
self.is_metric = not cp.vl["CAR_SPEED"]["IMPERIAL_UNIT"]
73+
# TODO: find CAR_SPEED for HONDA_ODYSSEY_TWN or use ACC_HUD w/ detection
74+
self.is_metric = self.CP.carFingerprint in (CAR.HONDA_ODYSSEY_TWN,) or not cp.vl["CAR_SPEED"]["IMPERIAL_UNIT"]
7275
self.v_cruise_factor = CV.MPH_TO_MS if self.dynamic_v_cruise_units and not self.is_metric else CV.KPH_TO_MS
7376

7477
# ******************* parse out can *******************
@@ -127,10 +130,11 @@ def update(self, can_parsers) -> structs.CarState:
127130

128131
ret.espDisabled = cp.vl["VSA_STATUS"]["ESP_DISABLED"] != 0
129132

130-
self.dash_speed_seen = self.dash_speed_seen or cp.vl["CAR_SPEED"]["ROUGH_CAR_SPEED_2"] > 1e-3
131-
if self.dash_speed_seen:
132-
conversion = CV.KPH_TO_MS if self.is_metric else CV.MPH_TO_MS
133-
ret.vEgoCluster = cp.vl["CAR_SPEED"]["ROUGH_CAR_SPEED_2"] * conversion
133+
if self.CP.carFingerprint not in (CAR.HONDA_ODYSSEY_TWN,):
134+
self.dash_speed_seen = self.dash_speed_seen or cp.vl["CAR_SPEED"]["ROUGH_CAR_SPEED_2"] > 1e-3
135+
if self.dash_speed_seen:
136+
conversion = CV.KPH_TO_MS if self.is_metric else CV.MPH_TO_MS
137+
ret.vEgoCluster = cp.vl["CAR_SPEED"]["ROUGH_CAR_SPEED_2"] * conversion
134138

135139
ret.steeringAngleDeg = cp.vl["STEERING_SENSORS"]["STEER_ANGLE"]
136140
ret.steeringRateDeg = cp.vl["STEERING_SENSORS"]["STEER_ANGLE_RATE"]

opendbc/car/honda/fingerprints.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,12 @@
220220
b'57114-TBG-A340\x00\x00',
221221
b'57114-TBG-A350\x00\x00',
222222
b'57114-TGG-A340\x00\x00',
223+
b'57114-TGG-C120\x00\x00',
223224
b'57114-TGG-C320\x00\x00',
224225
b'57114-TGG-G320\x00\x00',
225226
b'57114-TGG-L320\x00\x00',
226227
b'57114-TGG-L330\x00\x00',
228+
b'57114-TGH-A130\x00\x00',
227229
b'57114-TGH-L130\x00\x00',
228230
b'57114-TGJ-Q330\x00\x00',
229231
b'57114-TGK-T320\x00\x00',
@@ -238,6 +240,7 @@
238240
b'39990-TGG-A020\x00\x00',
239241
b'39990-TGG-A120\x00\x00',
240242
b'39990-TGG-J510\x00\x00',
243+
b'39990-TGH-J020\x00\x00',
241244
b'39990-TGH-J530\x00\x00',
242245
b'39990-TGL-E130\x00\x00',
243246
b'39990-TGN-E120\x00\x00',
@@ -254,6 +257,7 @@
254257
b'77959-TGG-J320\x00\x00',
255258
b'77959-TGG-Q810\x00\x00',
256259
b'77959-TGG-Z820\x00\x00',
260+
b'77959-TGH-E220\x00\x00',
257261
b'77959-TGH-J110\x00\x00',
258262
],
259263
(Ecu.fwdRadar, 0x18dab0f1, None): [
@@ -266,6 +270,7 @@
266270
b'36802-TGG-A130\x00\x00',
267271
b'36802-TGG-G040\x00\x00',
268272
b'36802-TGG-G130\x00\x00',
273+
b'36802-TGH-A030\x00\x00',
269274
b'36802-TGH-A140\x00\x00',
270275
b'36802-TGK-Q030\x00\x00',
271276
b'36802-TGK-Q120\x00\x00',
@@ -282,6 +287,7 @@
282287
b'36161-TGG-G070\x00\x00',
283288
b'36161-TGG-G130\x00\x00',
284289
b'36161-TGG-G140\x00\x00',
290+
b'36161-TGH-A020\x00\x00',
285291
b'36161-TGH-A140\x00\x00',
286292
b'36161-TGK-Q040\x00\x00',
287293
b'36161-TGK-Q120\x00\x00',
@@ -598,6 +604,17 @@
598604
b'54008-THR-A020\x00\x00',
599605
],
600606
},
607+
CAR.HONDA_ODYSSEY_TWN: {
608+
(Ecu.eps, 0x18da30f1, None): [
609+
b'39990-T6A-J210\x00\x00',
610+
],
611+
(Ecu.srs, 0x18da53f1, None): [
612+
b'77959-T6A-P110\x00\x00',
613+
],
614+
(Ecu.fwdRadar, 0x18dab0f1, None): [
615+
b'36161-T6A-P040\x00\x00',
616+
],
617+
},
601618
CAR.HONDA_ODYSSEY_5G_MMR: {
602619
(Ecu.vsa, 0x18da28f1, None): [
603620
b'57114-THR-A240\x00\x00',
@@ -1089,4 +1106,12 @@
10891106
b'36161-TGV-A030\x00\x00',
10901107
],
10911108
},
1109+
CAR.ACURA_TLX_2G_MMR: {
1110+
(Ecu.fwdRadar, 0x18dab0f1, None): [
1111+
b'8S302-TGV-A030\x00\x00',
1112+
],
1113+
(Ecu.fwdCamera, 0x18dab5f1, None): [
1114+
b'8S102-TGV-A030\x00\x00',
1115+
],
1116+
},
10921117
}

opendbc/car/honda/interface.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo
167167
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.28], [0.08]]
168168
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end
169169

170+
elif candidate == CAR.HONDA_ODYSSEY_TWN:
171+
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.28], [0.08]]
172+
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 32767], [0, 32767]] # TODO: determine if there is a dead zone at the top end
173+
170174
elif candidate == CAR.HONDA_PILOT:
171175
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end
172176
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.38], [0.11]]
@@ -195,13 +199,18 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo
195199
# When using stock ACC, the radar intercepts and filters steering commands the EPS would otherwise accept
196200
ret.minSteerSpeed = 70. * CV.KPH_TO_MS
197201

202+
elif candidate == CAR.ACURA_TLX_2G_MMR:
203+
ret.steerActuatorDelay = 0.15
204+
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]]
205+
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning)
206+
198207
else:
199208
ret.steerActuatorDelay = 0.15
200209
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560], [0, 2560]]
201210
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning)
202211

203212
# These cars use alternate user brake msg (0x1BE)
204-
if 0x1BE in fingerprint[CAN.pt] and candidate in (CAR.HONDA_ACCORD, CAR.HONDA_HRV_3G, *HONDA_BOSCH_CANFD):
213+
if 0x1BE in fingerprint[CAN.pt] and candidate in (CAR.HONDA_ACCORD, CAR.HONDA_HRV_3G, CAR.ACURA_RDX_3G, *HONDA_BOSCH_CANFD):
205214
ret.flags |= HondaFlags.BOSCH_ALT_BRAKE.value
206215

207216
if ret.flags & HondaFlags.BOSCH_ALT_BRAKE:
@@ -219,7 +228,12 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo
219228
# to a negative value, so it won't matter. Otherwise, add 0.5 mph margin to not
220229
# conflict with PCM acc
221230
ret.autoResumeSng = candidate in (HONDA_BOSCH | {CAR.HONDA_CIVIC})
222-
ret.minEnableSpeed = -1. if ret.autoResumeSng else 25.51 * CV.MPH_TO_MS
231+
if ret.autoResumeSng:
232+
ret.minEnableSpeed = -1.
233+
elif candidate == CAR.HONDA_ODYSSEY_TWN:
234+
ret.minEnableSpeed = 19. * CV.MPH_TO_MS
235+
else:
236+
ret.minEnableSpeed = 25.51 * CV.MPH_TO_MS
223237

224238
ret.steerLimitTimer = 0.8
225239
ret.radarDelay = 0.1

opendbc/car/honda/values.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ class CAR(Platforms):
185185
],
186186
CarSpecs(mass=1326, wheelbase=2.7, steerRatio=15.38, centerToFrontRatio=0.4), # steerRatio: 10.93 is end-to-end spec
187187
{Bus.pt: 'honda_civic_hatchback_ex_2017_can_generated'},
188+
flags=HondaFlags.ALLOW_MANUAL_TRANS,
188189
)
189190
HONDA_CIVIC_BOSCH_DIESEL = HondaBoschPlatformConfig(
190191
[], # don't show in docs
@@ -285,6 +286,11 @@ class CAR(Platforms):
285286
{Bus.pt: 'honda_civic_hatchback_ex_2017_can_generated'},
286287
flags=HondaFlags.BOSCH_ALT_RADAR,
287288
)
289+
# mid-model refresh
290+
ACURA_TLX_2G_MMR = HondaBoschCANFDPlatformConfig(
291+
[HondaCarDocs("Acura TLX 2025", "All")],
292+
CarSpecs(mass=3990 * CV.LB_TO_KG, wheelbase=2.87, centerToFrontRatio=0.43, steerRatio=13.7),
293+
)
288294

289295
# Nidec Cars
290296
ACURA_ILX = HondaNidecPlatformConfig(
@@ -332,6 +338,12 @@ class CAR(Platforms):
332338
radar_dbc_dict('honda_odyssey_exl_2018_generated'),
333339
flags=HondaFlags.NIDEC_ALT_PCM_ACCEL | HondaFlags.HAS_ALL_DOOR_STATES,
334340
)
341+
HONDA_ODYSSEY_TWN = HondaNidecPlatformConfig(
342+
[HondaCarDocs("Honda Odyssey (Taiwan) 2018-19")],
343+
CarSpecs(mass=1865, wheelbase=2.9, steerRatio=14.35, centerToFrontRatio=0.44, tireStiffnessFactor=0.82),
344+
radar_dbc_dict('honda_odyssey_twn_2018_generated'),
345+
flags=HondaFlags.NIDEC_ALT_SCM_MESSAGES,
346+
)
335347
ACURA_RDX = HondaNidecPlatformConfig(
336348
[HondaCarDocs("Acura RDX 2016-18", "AcuraWatch Plus or Advance Package", min_steer_speed=12. * CV.MPH_TO_MS)],
337349
CarSpecs(mass=3925 * CV.LB_TO_KG, wheelbase=2.68, steerRatio=15.0, centerToFrontRatio=0.38, tireStiffnessFactor=0.444), # as spec

opendbc/car/hyundai/fingerprints.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@
698698
b'\xf1\x00OSP MDPS C 1.00 1.02 56310-K4271 4OEPC102',
699699
b'\xf1\x00OSP MDPS C 1.00 1.02 56310/K4271 4OEPC102',
700700
b'\xf1\x00OSP MDPS C 1.00 1.02 56310/K4970 4OEPC102',
701+
b'\xf1\x00OSP MDPS C 1.00 1.02 56310/K4971 4OEPC102',
701702
b'\xf1\x00OSP MDPS C 1.00 1.02 56310K4260\x00 4OEPC102',
702703
b'\xf1\x00OSP MDPS C 1.00 1.02 56310K4261\x00 4OEPC102',
703704
b'\xf1\x00OSP MDPS C 1.00 1.02 56310K4971\x00 4OEPC102',
@@ -1084,12 +1085,14 @@
10841085
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.00 99211-N9260 14Y',
10851086
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.01 99211-N9100 14A',
10861087
b'\xf1\x00NX4 FR_CMR AT USA LHD 1.00 1.01 99211-N9240 14T',
1088+
b'\xf1\x00NX4 FR_CMR AT EUR LHD 1.00 1.00 99211-N9240 14Q',
10871089
],
10881090
(Ecu.fwdRadar, 0x7d0, None): [
10891091
b'\xf1\x00NX4__ 1.00 1.00 99110-N9100 ',
10901092
b'\xf1\x00NX4__ 1.00 1.01 99110-N9000 ',
10911093
b'\xf1\x00NX4__ 1.00 1.02 99110-N9000 ',
10921094
b'\xf1\x00NX4__ 1.01 1.00 99110-N9100 ',
1095+
b'\xf1\x00NX4__ 1.01 1.02 99110-N9000 ',
10931096
],
10941097
},
10951098
CAR.HYUNDAI_SANTA_CRUZ_1ST_GEN: {

0 commit comments

Comments
 (0)