Skip to content

Commit

Permalink
Volkswagen: combine platforms with common chassis codes (commaai#32147)
Browse files Browse the repository at this point in the history
* fix curb weight for Ateca to match Leon better

https://www.auto-data.net/en/seat-ateca-i-1.6-tdi-115hp-start-stop-23096

https://www.seat.com/content/dam/public/seat-website/car-shopping-tools/brochure-download/brochures/ateca/cars-specs-brochure-KH7-NA-december-2018.pdf

* combine leon and ateca

* combine fw

* migrate

* great, both use same torque params

* scala and kamiq

* remove duplicates

* fix

* fix!
  • Loading branch information
sshane authored Apr 10, 2024
1 parent bf61e92 commit 16bb4a9
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 58 deletions.
6 changes: 4 additions & 2 deletions selfdrive/car/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,15 @@ def all_legacy_fingerprint_cars():
"AUDI Q2 1ST GEN": VW.AUDI_Q2_MK1,
"AUDI Q3 2ND GEN": VW.AUDI_Q3_MK2,
"SEAT ATECA 1ST GEN": VW.SEAT_ATECA_MK1,
"SEAT LEON 3RD GEN": VW.SEAT_LEON_MK3,
"SEAT LEON 3RD GEN": VW.SEAT_ATECA_MK1,
"SEAT_LEON_MK3": VW.SEAT_ATECA_MK1,
"SKODA FABIA 4TH GEN": VW.SKODA_FABIA_MK4,
"SKODA KAMIQ 1ST GEN": VW.SKODA_KAMIQ_MK1,
"SKODA KAROQ 1ST GEN": VW.SKODA_KAROQ_MK1,
"SKODA KODIAQ 1ST GEN": VW.SKODA_KODIAQ_MK1,
"SKODA OCTAVIA 3RD GEN": VW.SKODA_OCTAVIA_MK3,
"SKODA SCALA 1ST GEN": VW.SKODA_SCALA_MK1,
"SKODA SCALA 1ST GEN": VW.SKODA_KAMIQ_MK1,
"SKODA_SCALA_MK1": VW.SKODA_KAMIQ_MK1,
"SKODA SUPERB 3RD GEN": VW.SKODA_SUPERB_MK3,

"mock": MOCK.MOCK,
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/car/tests/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@ class CarTestRoute(NamedTuple):
CarTestRoute("6c6b466346192818|2021-06-06--14-17-47", VOLKSWAGEN.AUDI_Q2_MK1),
CarTestRoute("0cd0b7f7e31a3853|2021-12-03--03-12-05", VOLKSWAGEN.AUDI_Q3_MK2),
CarTestRoute("8f205bdd11bcbb65|2021-03-26--01-00-17", VOLKSWAGEN.SEAT_ATECA_MK1),
CarTestRoute("fc6b6c9a3471c846|2021-05-27--13-39-56", VOLKSWAGEN.SEAT_LEON_MK3),
CarTestRoute("fc6b6c9a3471c846|2021-05-27--13-39-56", VOLKSWAGEN.SEAT_ATECA_MK1), # Leon
CarTestRoute("0bbe367c98fa1538|2023-03-04--17-46-11", VOLKSWAGEN.SKODA_FABIA_MK4),
CarTestRoute("12d6ae3057c04b0d|2021-09-15--00-04-07", VOLKSWAGEN.SKODA_KAMIQ_MK1),
CarTestRoute("12d6ae3057c04b0d|2021-09-04--21-21-21", VOLKSWAGEN.SKODA_KAROQ_MK1),
CarTestRoute("90434ff5d7c8d603|2021-03-15--12-07-31", VOLKSWAGEN.SKODA_KODIAQ_MK1),
CarTestRoute("66e5edc3a16459c5|2021-05-25--19-00-29", VOLKSWAGEN.SKODA_OCTAVIA_MK3),
CarTestRoute("026b6d18fba6417f|2021-03-26--09-17-04", VOLKSWAGEN.SKODA_SCALA_MK1),
CarTestRoute("026b6d18fba6417f|2021-03-26--09-17-04", VOLKSWAGEN.SKODA_KAMIQ_MK1), # Scala
CarTestRoute("b2e9858e29db492b|2021-03-26--16-58-42", VOLKSWAGEN.SKODA_SUPERB_MK3),

CarTestRoute("3c8f0c502e119c1c|2020-06-30--12-58-02", SUBARU.SUBARU_ASCENT),
Expand Down
2 changes: 0 additions & 2 deletions selfdrive/car/torque_data/substitute.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"]

"SKODA_FABIA_MK4" = "VOLKSWAGEN_GOLF_MK7"
"SKODA_OCTAVIA_MK3" = "SKODA_SUPERB_MK3"
"SKODA_SCALA_MK1" = "SKODA_SUPERB_MK3"
"SKODA_KODIAQ_MK1" = "SKODA_SUPERB_MK3"
"SKODA_KAROQ_MK1" = "SKODA_SUPERB_MK3"
"SKODA_KAMIQ_MK1" = "SKODA_SUPERB_MK3"
Expand All @@ -70,7 +69,6 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"]
"AUDI_Q2_MK1" = "VOLKSWAGEN_TIGUAN_MK2"
"VOLKSWAGEN_TAOS_MK1" = "VOLKSWAGEN_TIGUAN_MK2"
"VOLKSWAGEN_POLO_MK6" = "VOLKSWAGEN_GOLF_MK7"
"SEAT_LEON_MK3" = "VOLKSWAGEN_GOLF_MK7"
"SEAT_ATECA_MK1" = "VOLKSWAGEN_GOLF_MK7"

"SUBARU_CROSSTREK_HYBRID" = "SUBARU_IMPREZA_2020"
Expand Down
51 changes: 12 additions & 39 deletions selfdrive/car/volkswagen/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,22 +874,6 @@
CAR.SEAT_ATECA_MK1: {
(Ecu.engine, 0x7e0, None): [
b'\xf1\x8704E906027KA\xf1\x893749',
],
(Ecu.transmission, 0x7e1, None): [
b'\xf1\x870D9300014S \xf1\x895202',
],
(Ecu.srs, 0x715, None): [
b'\xf1\x873Q0959655BH\xf1\x890703\xf1\x82\x0e1212001211001305121211052900',
],
(Ecu.eps, 0x712, None): [
b'\xf1\x873Q0909144L \xf1\x895081\xf1\x82\x0571N60511A1',
],
(Ecu.fwdRadar, 0x757, None): [
b'\xf1\x872Q0907572M \xf1\x890233',
],
},
CAR.SEAT_LEON_MK3: {
(Ecu.engine, 0x7e0, None): [
b'\xf1\x8704L906021EL\xf1\x897542',
b'\xf1\x8704L906026BP\xf1\x891198',
b'\xf1\x8704L906026BP\xf1\x897608',
Expand All @@ -903,25 +887,29 @@
b'\xf1\x870CW300041D \xf1\x891004',
b'\xf1\x870CW300041G \xf1\x891003',
b'\xf1\x870CW300050J \xf1\x891908',
b'\xf1\x870D9300014S \xf1\x895202',
b'\xf1\x870D9300042M \xf1\x895016',
b'\xf1\x870GC300043A \xf1\x892304',
],
(Ecu.srs, 0x715, None): [
b'\xf1\x873Q0959655AC\xf1\x890189\xf1\x82\r11110011110011021511110200',
b'\xf1\x873Q0959655AS\xf1\x890200\xf1\x82\r11110011110011021511110200',
b'\xf1\x873Q0959655AS\xf1\x890200\xf1\x82\r12110012120012021612110200',
b'\xf1\x873Q0959655BH\xf1\x890703\xf1\x82\x0e1212001211001305121211052900',
b'\xf1\x873Q0959655BH\xf1\x890703\xf1\x82\x0e1312001313001305171311052900',
b'\xf1\x873Q0959655BH\xf1\x890712\xf1\x82\x0e1312001313001305171311052900',
b'\xf1\x873Q0959655CM\xf1\x890720\xf1\x82\x0e1312001313001305171311052900',
],
(Ecu.eps, 0x712, None): [
b'\xf1\x873Q0909144L \xf1\x895081\xf1\x82\x0571N60511A1',
b'\xf1\x875Q0909144AA\xf1\x891081\xf1\x82\x0521N01842A1',
b'\xf1\x875Q0909144AB\xf1\x891082\xf1\x82\x0521N01342A1',
b'\xf1\x875Q0909144P \xf1\x891043\xf1\x82\x0511N01805A0',
b'\xf1\x875Q0909144T \xf1\x891072\xf1\x82\x0521N01309A1',
b'\xf1\x875Q0909144T \xf1\x891072\xf1\x82\x0521N05808A1',
],
(Ecu.fwdRadar, 0x757, None): [
b'\xf1\x872Q0907572M \xf1\x890233',
b'\xf1\x875Q0907572B \xf1\x890200\xf1\x82\x0101',
b'\xf1\x875Q0907572H \xf1\x890620',
b'\xf1\x875Q0907572K \xf1\x890402\xf1\x82\x0101',
Expand All @@ -948,15 +936,22 @@
},
CAR.SKODA_KAMIQ_MK1: {
(Ecu.engine, 0x7e0, None): [
b'\xf1\x8704C906025AK\xf1\x897053',
b'\xf1\x8705C906032M \xf1\x891333',
b'\xf1\x8705C906032M \xf1\x892365',
b'\xf1\x8705E906013CK\xf1\x892540',
],
(Ecu.transmission, 0x7e1, None): [
b'\xf1\x870CW300020 \xf1\x891906',
b'\xf1\x870CW300020 \xf1\x891907',
b'\xf1\x870CW300020T \xf1\x892204',
b'\xf1\x870CW300050 \xf1\x891709',
],
(Ecu.srs, 0x715, None): [
b'\xf1\x872Q0959655AJ\xf1\x890250\xf1\x82\x1211110411110411--04040404131111112H14',
b'\xf1\x872Q0959655AM\xf1\x890351\xf1\x82\x12111104111104112104040404111111112H14',
b'\xf1\x872Q0959655AM\xf1\x890351\xf1\x82\x122221042111042121040404042E2711152H14',
b'\xf1\x872Q0959655AS\xf1\x890411\xf1\x82\x1311150411110411210404040417151215391413',
b'\xf1\x872Q0959655BJ\xf1\x890412\xf1\x82\x132223042111042121040404042B251215391423',
],
(Ecu.eps, 0x712, None): [
Expand All @@ -965,6 +960,7 @@
],
(Ecu.fwdRadar, 0x757, None): [
b'\xf1\x872Q0907572AA\xf1\x890396',
b'\xf1\x872Q0907572R \xf1\x890372',
b'\xf1\x872Q0907572T \xf1\x890383',
],
},
Expand Down Expand Up @@ -1117,29 +1113,6 @@
b'\xf1\x875Q0907572R \xf1\x890771',
],
},
CAR.SKODA_SCALA_MK1: {
(Ecu.engine, 0x7e0, None): [
b'\xf1\x8704C906025AK\xf1\x897053',
b'\xf1\x8705C906032M \xf1\x892365',
],
(Ecu.transmission, 0x7e1, None): [
b'\xf1\x870CW300020 \xf1\x891907',
b'\xf1\x870CW300050 \xf1\x891709',
],
(Ecu.srs, 0x715, None): [
b'\xf1\x872Q0959655AJ\xf1\x890250\xf1\x82\x1211110411110411--04040404131111112H14',
b'\xf1\x872Q0959655AM\xf1\x890351\xf1\x82\x12111104111104112104040404111111112H14',
b'\xf1\x872Q0959655AS\xf1\x890411\xf1\x82\x1311150411110411210404040417151215391413',
],
(Ecu.eps, 0x712, None): [
b'\xf1\x872Q1909144AB\xf1\x896050',
b'\xf1\x872Q1909144M \xf1\x896041',
],
(Ecu.fwdRadar, 0x757, None): [
b'\xf1\x872Q0907572AA\xf1\x890396',
b'\xf1\x872Q0907572R \xf1\x890372',
],
},
CAR.SKODA_SUPERB_MK3: {
(Ecu.engine, 0x7e0, None): [
b'\xf1\x8704E906027BS\xf1\x892887',
Expand Down
23 changes: 10 additions & 13 deletions selfdrive/car/volkswagen/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ def init_make(self, CP: car.CarParams):
# Check the 7th and 8th characters of the VIN before adding a new CAR. If the
# chassis code is already listed below, don't add a new CAR, just add to the
# FW_VERSIONS for that existing CAR.
# Exception: SEAT Leon and SEAT Ateca share a chassis code

class CAR(Platforms):
VOLKSWAGEN_ARTEON_MK1 = VolkswagenMQBPlatformConfig( # Chassis AN
Expand Down Expand Up @@ -307,20 +306,22 @@ class CAR(Platforms):
VolkswagenCarSpecs(mass=1623, wheelbase=2.68),
)
SEAT_ATECA_MK1 = VolkswagenMQBPlatformConfig( # Chassis 5F
[VWCarDocs("SEAT Ateca 2018")],
VolkswagenCarSpecs(mass=1900, wheelbase=2.64),
)
SEAT_LEON_MK3 = VolkswagenMQBPlatformConfig( # Chassis 5F
[VWCarDocs("SEAT Leon 2014-20")],
VolkswagenCarSpecs(mass=1227, wheelbase=2.64),
[
VWCarDocs("SEAT Ateca 2018"),
VWCarDocs("SEAT Leon 2014-20"),
],
VolkswagenCarSpecs(mass=1300, wheelbase=2.64),
)
SKODA_FABIA_MK4 = VolkswagenMQBPlatformConfig( # Chassis PJ
[VWCarDocs("Škoda Fabia 2022-23", footnotes=[Footnote.VW_MQB_A0])],
VolkswagenCarSpecs(mass=1266, wheelbase=2.56),
)
SKODA_KAMIQ_MK1 = VolkswagenMQBPlatformConfig( # Chassis NW
[VWCarDocs("Škoda Kamiq 2021-23", footnotes=[Footnote.VW_MQB_A0, Footnote.KAMIQ])],
VolkswagenCarSpecs(mass=1265, wheelbase=2.66),
[
VWCarDocs("Škoda Kamiq 2021-23", footnotes=[Footnote.VW_MQB_A0, Footnote.KAMIQ]),
VWCarDocs("Škoda Scala 2020-23", footnotes=[Footnote.VW_MQB_A0]),
],
VolkswagenCarSpecs(mass=1230, wheelbase=2.66),
)
SKODA_KAROQ_MK1 = VolkswagenMQBPlatformConfig( # Chassis NU
[VWCarDocs("Škoda Karoq 2019-23")],
Expand All @@ -338,10 +339,6 @@ class CAR(Platforms):
],
VolkswagenCarSpecs(mass=1388, wheelbase=2.68),
)
SKODA_SCALA_MK1 = VolkswagenMQBPlatformConfig( # Chassis NW
[VWCarDocs("Škoda Scala 2020-23", footnotes=[Footnote.VW_MQB_A0])],
VolkswagenCarSpecs(mass=1192, wheelbase=2.65),
)
SKODA_SUPERB_MK3 = VolkswagenMQBPlatformConfig( # Chassis 3V/NP
[VWCarDocs("Škoda Superb 2015-22")],
VolkswagenCarSpecs(mass=1505, wheelbase=2.84),
Expand Down

0 comments on commit 16bb4a9

Please sign in to comment.