Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add supported car for 2019 Toyota Altis Hybrid #859

Merged
merged 10 commits into from
Oct 25, 2019
Merged

Add supported car for 2019 Toyota Altis Hybrid #859

merged 10 commits into from
Oct 25, 2019

Conversation

@rbiasini
Copy link
Contributor

rbiasini commented Oct 22, 2019

Thanks! My understanding is that the Altis is the same as the Corolla in the US market., correct? If yes, I would prefer to call it Corolla Hybrid (COROLLAH_TSS2) for consistency with the US market.
Also, do you mind adding the newly supported model to the list in README.md?

@rbiasini
Copy link
Contributor

Also, fingerprint looks good. If you can change the name of the car, then it's good to be merged.

@rbiasini
Copy link
Contributor

Sorry for the back and forth, but thinking about it more, there is no need to separate the Corolla Hybrid from the Corolla ICE (same params). I think all you need is the diff below:

diff --git a/README.md b/README.md
index 64a093261..6748225c6 100644
--- a/README.md
+++ b/README.md
@@ -107,6 +107,7 @@ Supported Cars
 | Toyota               | Corolla 2017-19                    | All                  | Yes     | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph           |
 | Toyota               | Corolla 2020                       | All                  | Yes     | Yes            | 0mph             | 0mph           |
 | Toyota               | Corolla Hatchback 2019             | All                  | Yes     | Yes            | 0mph             | 0mph           |
+| Toyota               | Corolla Hybrid 2020                | All                  | Yes     | Yes            | 0mph             | 0mph           |
 | Toyota               | Highlander 2017-19                 | All                  | Yes     | Yes<sup>2</sup>| 0mph             | 0mph           |
 | Toyota               | Highlander Hybrid 2017-19          | All                  | Yes     | Yes<sup>2</sup>| 0mph             | 0mph           |
 | Toyota               | Prius 2016                         | TSS-P                | Yes     | Yes<sup>2</sup>| 0mph             | 0mph           |
diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py
index 34060243a..c917f00b8 100644
--- a/selfdrive/car/toyota/values.py
+++ b/selfdrive/car/toyota/values.py
@@ -21,7 +21,7 @@ class CAR:
   HIGHLANDERH = "TOYOTA HIGHLANDER HYBRID 2018"
   AVALON = "TOYOTA AVALON 2016"
   RAV4_TSS2 = "TOYOTA RAV4 2019"
-  COROLLA_TSS2 = "TOYOTA COROLLA TSS2 2019"
+  COROLLA_TSS2 = "TOYOTA COROLLA TSS2 2019"  # includes hybrid models
   LEXUS_ESH_TSS2 = "LEXUS ES 300H 2019"
   SIENNA = "TOYOTA SIENNA XLE 2018"
   LEXUS_IS = "LEXUS IS300 2018"
@@ -173,6 +173,10 @@ class ECU:
   # hatch 2019+ and sedan 2020+
   {
     36: 8, 37: 8, 114: 5, 170: 8, 180: 8, 186: 4, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7, 705: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 764: 8, 765: 8, 800: 8, 810: 2, 812: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1076: 8, 1077: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1172: 8, 1235: 8, 1237: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1649: 8, 1745: 8, 1775: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1808: 8, 1809: 8, 1816: 8, 1817: 8, 1840: 8, 1848: 8, 1904: 8, 1912: 8, 1940: 8, 1941: 8, 1948: 8, 1949: 8, 1952: 8, 1960: 8, 1981: 8, 1986: 8, 1990: 8, 1994: 8, 1998: 8, 2004: 8
+  },
+  # 2019 Taiwan Altis Hybrid
+  {
+    36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 401: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 765: 8, 800: 8, 810: 2, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 885: 8, 896: 8, 898: 8, 918: 7, 921: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 987: 8, 993: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1082: 8, 1112: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1172: 8, 1235: 8, 1237: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1594: 8, 1595: 8, 1745: 8, 1775: 8, 1779: 8
   }],
   CAR.LEXUS_ESH_TSS2: [
   {

Do you agree? If you make a PR with that I will merge this PR.

@u8511049
Copy link
Author

Hi rbiasini,
corolla_tss2 and altish_tss2 have different dbc as below.
CAR.COROLLA_TSS2: dbc_dict('toyota_nodsu_pt_generated', 'toyota_tss2_adas'),
CAR.ALTISH_TSS2: dbc_dict('toyota_nodsu_hybrid_pt_generated', 'toyota_tss2_adas'),
I try to add fingerprint in corolla_tss2 but get an "Communication Issue between processes" error.
I think the different is about the gear. AltisH gear is "P R N D B"

@rbiasini
Copy link
Contributor

Ah, good catch! Can we just call it Toyota Hybrid and add it to the Readme (see my diffs)? Then it's good to go.

@u8511049
Copy link
Author

u8511049 commented Oct 24, 2019

Sure. Thanks for helping.
so, should I close this request?

@u8511049 u8511049 closed this Oct 24, 2019
@rbiasini rbiasini reopened this Oct 24, 2019
@rbiasini
Copy link
Contributor

Oh, why closing it? I mean, if you change the car name and add it to the readme I'll merge it in.

@u8511049
Copy link
Author

Got it. :)
I had changed the car name and add it to the readme.
Thanks.

README.md Outdated
@@ -120,6 +120,7 @@ Supported Cars
| Toyota | Rav4 Hybrid 2016 | TSS-P | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Rav4 Hybrid 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Sienna 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Toyota Hybrid 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be:

| Toyota               | Toyota Corolla Hybrid 2020      | All                  | Yes     | Yes            | 0mph             | 0mph           | Toyota            |

And placed in alphabetical order in the table (after Corolla Hatchback)

@@ -15,6 +15,7 @@ class CAR:
AVALON = "TOYOTA AVALON 2016"
RAV4_TSS2 = "TOYOTA RAV4 2019"
COROLLA_TSS2 = "TOYOTA COROLLA TSS2 2019"
TOYOTAH_TSS2 = "TOYOTA HYBRID TSS2 2019"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be
COROLLAH_TSS2 = "TOYOTA COROLLA HYBRID TSS2 2019"

@rbiasini
Copy link
Contributor

Almost. Sorry, I'm not being clear, my fault. See 2 comments in PR

@u8511049
Copy link
Author

It's ok.
Please check it.
Thanks.

@rbiasini
Copy link
Contributor

looks good!

@rbiasini rbiasini merged commit d2a92fc into commaai:devel Oct 25, 2019
@u8511049 u8511049 deleted the u8511049-patch-1 branch October 25, 2019 18:11
BogGyver referenced this pull request in BogGyver/openpilot Nov 12, 2019
* fix ALCA module

* Update ALCA_module.py

* Promote panda fixes from alpha to devel (#98)

* Fix for mock car crash

* fix ALCA module

* do not use

* radar_interface logic improvements

* remove radar logging

* radar_interface refactoring

* Log radar_interface CAN error, Process Comm Errors (#95)

* Log radar_interface CAN error

* Add support for process comm error logging

* Improve Process Comm error logging

* Can and CommError throttling

* Update radar_interface.py

* fixing push per Raf's comments

* ALCA and radar_interface work (#96) (#97)

* do not use

* radar_interface logic improvements

* remove radar logging

* radar_interface refactoring

* Update radar_interface.py

* fixing push per Raf's comments

* fix process comm issue

* switch radard from lane_parser to model

* radar/ALCA changes

* fix lane width

* switched back to not deleting CarParams to avoid radar failure when rebooting EON while driving

* cleanup some debug info to be able to restart ALCA research

* tweaks on safety_tesla.h for can bus isolation

* few more cleanups to safety_tesla.h

* fix start signal logic

* Increase LEXUS_IS safetyParam to 77 (#841)

* use list comprehension (#839)

* use list comprehension

* oops index range fix

* simplify encode/decode in dbc (#840)

* simplify encode/decode

* 2019 Highlander Hybrid Limited Platinum (#843)

fingerprint from ogdragonzypher on Discord

* Allow to lock safety mode to keep gm/tesla cars supported (#844)

* Force subaru to assume the stock camera is connected (#849)

* Revert to using the sum of the lane line probabilities instead of the the product

* Add core OP support for CRC validation, with extra support for Volkswagen MQB (#836)

* Generalized core OP CRC support plus extra bits for Volkswagen MQB.

* Update ref to process_replay regression test

* Remove unneded use of replace, causing json to fail loading the alert

* Add supported car for 2019 Toyota Altis Hybrid (#859)

* add supported car for 2019 Toyota Altis Hybird / Corolla hybrid 2020 (US market)

* remove unnecessary comprehensions (#863)

* Added fingerprint from Sienna XLE AWD (#848)

* Added fingerprint from Sienna XLE AWD

* Update driver_monitor.py

* Update driver_monitor.py

* Update driver_monitor.py

* fix stupid merge issue

* Adds 2019 Lexus ES (non hybrid) (#866)

* Adds 2019 Lexus ES (non hybrid)

* Updated test route

* merge issues

* Update README with now supported Subaru Harness

* Disable LDW for 4 seconds after blinker transition from on to off (#112)

If we want to change lanes with a blinker tap (3 blink mode), then we need to disable LDW for enough time to allow a smooth manual lane change. 4 seconds as it seems the freq is actually around 50Hz, not 100Hz.

* Disable HSO for 3 seconds after blinker has been active (#111)

Avoid HSO will deactivate and try to take the car back into the lane during a manual lane change with blinker tapped (3 blinks mode)

* params learner to only learn @ cons speed

Acceleration/deceleration in turns affect yaw as measured by phone and will create potential issues with learner. This code changes the learner to only adjust parameters when speed is constant

* Update to match new version of python in eons

* python 3 fixes for test client / server

* async/await server

* Don't log for action message as it's too often, and we throttle it internally.

* fix merge issue in thermald

* fixes and tweaks; code simplification

* Saving P,I,F parameters from pid controller (#116)

Added separate save/load functions, try catch - and saving the right constants to the params file.

* Feature/tinklad throttling + linting (#118)

* Throttle tinlkad's attemptToSendPendingMessages

* Remove get_git_remote from registration. It's defined in version already.

* tinklad linting

* tesla linting

* Prevent multiple readings of the pid params file (#119)

..only load the pid values when we initiate the LoC

* missing V_PID_FILE constant (#121)

* show cars in IC for non-radar users (#120)

* bug fixes

* Fix issue where user info was being dropped on no connectivity (#122)

* move pisParams, fix GPS logging

* Bugfix tinklad throttling (#124)

* ALCA4 (still in dev)

* ALCA4 tuning

* ALCA4 alpha release

* ALCA4 tweak for turns

* ACC fix; LDW mite during ALCA

* ALCA polishing

* fix enter_canloader.py for python 3

* should_ldw changes

moved the should_ldw code closer together and added status messages for when LDW is active and inactive

* thermald and ALCA

* ALCA sinplified logic
dragonpilot pushed a commit to dragonpilot-community/dragonpilot that referenced this pull request Apr 7, 2020
* add supported car for 2019 Toyota Altis Hybird / Corolla hybrid 2020 (US market)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants