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

Tesla Model S support #246

Closed
wants to merge 1,196 commits into from
Closed

Tesla Model S support #246

wants to merge 1,196 commits into from

Conversation

jeankalud
Copy link

@jeankalud jeankalud commented May 11, 2018

img-4805_small

Started a new fork from my git account. Will be easier to make changes and push new files.

Currently working great on latest 0.4.7.2 comma.ai version, merging version 0.5 in progress...

See wiki for more informations: https://community.comma.ai/wiki/index.php/Tesla

Join us in #tesla on comma.slack.com

Tesla code is at: https://github.com/jeankalud/openpilot/tree/tesla

Article on Electrek: https://electrek.co/2018/06/11/tesla-model-s-george-hotz-comma-ai-semi-autonomous-driving-tech/

---- FROM Previous Pull Request ----
Model S Support by:
Jean-Claude Thibault (Kalud)
and
Robert Cotran (zax123)

A huge thanks to them! The openpilot community is amazing.

Check out a video of it working on a pre AP Tesla:
https://www.youtube.com/watch?v=ro48vcN4VxY

Note: All new car support is extremely alpha. Unless you are ready to spend time tinkering and know how to safely experiment, please wait until this is merged into openpilot master and been audited for safety.

@geohot
Copy link
Contributor

geohot commented May 11, 2018

Closing my PR, see #145 for the old one

@geohot geohot mentioned this pull request May 13, 2018
@geohot
Copy link
Contributor

geohot commented May 14, 2018

We are no longer upstreaming car ports other than Honda, Toyota, and GM. But if you maintain and get 10 other people using this fork by the end of the year, we'll pay out the bounty.

@Spacefish
Copy link

@geohot why not upstream other car brand ports? Why the lock-in? Isn´t this a open project?

@rbiasini
Copy link
Contributor

@jeankalud , I like the little endian support. Thanks. If you can make it a standalone PR without Tesla references, then we'll merge it.

@geohot
Copy link
Contributor

geohot commented May 21, 2018

The project is open in the sense that it's MIT license. But by upstreaming, we would implicitly be agreeing to maintain the other car ports. It's not worth it unless it's shippable on a very high volume car, which Tesla isn't.

But it is open, so you can fork it, port it, and maintain it yourself!

(I will upstream safety numbers though to avoid conflicts)

@jeankalud
Copy link
Author

jeankalud commented May 21, 2018

We understand, we should close this PR I guess. I just did a standalone PR for little endian support. I will later today or early next week make another PR for the basic Tesla safety numbers, that would be useful, thanks.

@geohot
Copy link
Contributor

geohot commented May 21, 2018

You are welcome to leave the PR, easy for people to find the port

@jeankalud
Copy link
Author

As of June 5th, the code is now working. Still lots of safety and clean-up, but it drives very well, a bit better than 0.3.5. The model indeed improved since. Most noticeable change is during highway turns and when turns completes.

@rbiasini
Copy link
Contributor

@jeankalud I see 2 Tesla PRs. Is one obsolete?

@jeankalud
Copy link
Author

This one is the one @geohot wanted to keep alive even if he would not merge it, as a reference and to guide people to our repo.

Frankly, we certainly need to reserve the safety numbers, which is what the other PR was for. But since code always changes, we probably should close the other PR, and make a new one just to add safety numbers in panda safety,, capnp, boardd.

@jeankalud
Copy link
Author

@rbiasini this PR is linked to our current branch (tesla). Its what our 13 (and growing) users are using right now.

Will add / modify, what's needed to make it acceptable for Comma.ai

@jeankalud
Copy link
Author

@mtourangeau 2017 and 2018 Prius Prime are already supported. See https://github.com/commaai/openpilot/blob/866711ef2e03b77c19e199f65d4b9887bb40e7f3/README.md

@mtourangeau
Copy link

So you meant the message is displayed in the HUD of the Prime? This modification is in the Tesla file only.

@mtourangeau
Copy link

I commented about this: Try HUD steer_required for saying human steering

@jeankalud
Copy link
Author

@mtourangeau I have no idea what you are talking about, but this is Tesla specific changes. I never saw a Prius Prime myself up close. No idea. Try Slack in #toyota channel

@thibautrey
Copy link

@geohot Aftermarket with no AP is more common than you would like to believe. And I suspect more are coming since we are reaching end of leasing contracts that were made 2-4 years ago in Europe. For what it's worth I'm waiting to receive a P85D no AP later this month so that's one more crazy person that's gonna try this PR.

@dsbilling
Copy link

I will definitively try out this PR when I have the time and money to do this project. I really want OP in my pre-AP car!

@jeankalud
Copy link
Author

This is our current 0.5 merged. Currently working on merging 0.5.1

@Geczy
Copy link

Geczy commented Aug 29, 2018

@jeankalud can you fix the merge conflicts, and update the branch?

@pd0wm pd0wm changed the title Tesla Model S support (take 2) Tesla Model S support Oct 30, 2018
@Yegmorcar-zz
Copy link

Is this still being maintained, Jean-Claude?

@jeankalud
Copy link
Author

Is this still being maintained, Jean-Claude?

It is still maintained and actively worked on.

Join us on Discord, #tesla channel

@geohot geohot added the car port label Jun 7, 2019
pd0wm pushed a commit that referenced this pull request Jul 22, 2019
45d0d28 remove whitespace (#255)
e49d0db Pedal: use avg between tracks (#253)
c597dcc VERSION update after health packet changes and minor misra test change
01072be Misra 11.x: pointer usage. (#250)
fd68c26 Propagate can_push errors (#249)
ce1daf2 Misra check only done for EON config
70d4fd7 cleanup docker container on failure
04756a0 Turning back Misra check: unvoluntarily change
fcb1208 fix weird code in USB_ReadPacket
b983cc8 Re-wrote test_misra.sh
0b19206 Misra 17.7: The value returned by a function having non-void return type shall be used. We should hang on initial failed safety_set_mode
06ee8bd Ignore Misra 5.4 until cppcheck bug (?) is fixed
4be8582 Update cppcheck commit and pass predefined params to avoid impossible combinations of configs
f45dd04 cppcheck: ignore redundantAssignment and selfAssignment for registers in llcan.h
9ce6311 Misra 12.1 (operator order) and 10.4 (incompatible essential types) fixes, arised after properly checking UID_BASE config
1cd34e5 Explicitly set the define and undefine for unknown configs in misra checks
5a02499 remove esp flash from run_automated_tests.sh
23e3684 Cppcheck unused functions (#247)
c97d60b Removed bad language
b031480 Missed adding Dockerfile
91ff6bb Run language checker in CI
205ec34 Improved language checker
f7bbab0 Language checker test
d9d0a62 Misra 5.5: missed this change from previous PR
85fa3c0 Misra 5.5: Identifiers shall be distinct from macro names (#246)
190d604 Pedal: 2 minor fixes to Misra 15.7 (else needed) and 17.7 (non-void output must be used)
8ea01ff Pedal: no built-in functions to avoid puts and putc re-definitions
1f40d1e Misra pedal (#245)
a4554e3 Ignore advisory Misra 19.2: the union keyword should not be used
e6dc417 Minor indent error
247e128 Fix strict compiler on bootstub build
ba68569 Removed build strict test and enabled -Werror flag
da11f0f safety replay: update openpilot-tools after logreader fix
fc8b9e4 Cppcheck: also check pedal
f7bd2c2 Misra 10.4: fix last 2 violations (#242)
9be5fde finished misra 17.8 (#241)
3c3aba3 Misra 10.4: Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category (#240)
f2a3a17 Misra 15_7: fix what seems to be a false positive of cppcheck
812ace5 Misra 15_7: if … else if constructs should be terminated with an else clause (#230)
79e9735 rename 5_wifi_udp.py
3c3ff0c Update Jenkinsfile (#239)
1bd9284 Misra 17.7: the value returned by a function having non-void return shall be used (#237)
18c9e88 Merge pull request #238 from commaai/misra_17_8
7ac321d Merge pull request #235 from commaai/memxxx
004e543 Jenkins: run EON test first
4bff286 Merge branch 'memxxx' of github.com:commaai/panda into memxxx
7cd80de typo
385e33b 12.1 regression
955842b WIP
ea908cb 10_1 violations: Operands shall not be of an inappropriate essential type (#233)
fa33038 Fix Misra 5.3: An identifier declared in an inner scope shall not hide an identifier declared in an outer scope (#236)
ebfe1c5 Merge branch 'master' of github.com:commaai/panda into memxxx
8c11470 Fix EON test case
64e18e8 fix inverted logic to differentiate between dev and EON panda builds
36755a0 Merge branch 'master' of github.com:commaai/panda into memxxx
e2981d6 skip wifi tests for EON panda build
db2eec9 Merge branch 'master' of github.com:commaai/panda into memxxx
11257e7 Ignore test 5_wifi_udp.py_ignore: too unreliable for now
6973c2a fix wifi tests
cf6985a memxxx function changes to be Misra compliant
3a6cd29 wifi threshold perc back to 20%. Problem wasn't this.
d92a035 faster docker build for safety replay
3e9469b Fixing tests after min->MIN  change
ecb9b6c Revert "Misra 10 1: Operands shall not be of an inappropriate essential type (#232)"
8732e4f Misra 10 1: Operands shall not be of an inappropriate essential type (#232)

git-subtree-dir: panda
git-subtree-split: 45d0d28
avolmensky pushed a commit to avolmensky/openpilot that referenced this pull request Aug 6, 2019
* Misra 5.5: Identifiers shall be distinct from macro names
emmertex added a commit to emmertex/openpilot that referenced this pull request Aug 17, 2019
* Better Panda

* 0.6.0.2 Untested

* update releases

* bug

* Send fingerprints to Sentry

* Refactor default Civic params (commaai#720)

* move civic params out

* fix variable name

* simplify ford scaling

* cleanup

* remove import dependency

* requested changes

* keep hyundai

* 2019 Rav4 Limited AWD (commaai#732)

* Fingerprint

* Merge Limited and XLE fingerprint because they're the same

* 0.6.0.3 - Untested

* no mapd just yet

* Remote ASL

* Done

* panda too

* mapd, auto speed and cloudlog

* start mapd

* Test

* bug

* fix spacing in toyota/carstate.py (commaai#736)

* better code

* bug

* bug

* bug

* bug

* bug

* tweak

* Fix lane centering with single lane line (commaai#737)

* add loggered, gpsd, sensord to gitignore (commaai#735)

* Improve Toyota Highlander tuning from commaai#690

* Added 2019 Toyota Highlander (commaai#739)

Tested latest commit on ICE version, and it worked flawlessly out of box.  Fantastic experience.

* Use standard steer angle sensor in DSU-less pre-TSS2 Toyota. (commaai#751)

* Squashed 'cereal/' changes from 9f2076e..4ea03ba

4ea03ba add speed
2198ad2 add alert for invalid posenet
9c18b3b rename to posenetValid
42669a8 add posenet debug fields to LiveParameters
852846f add whether point is detected by radar
1684698 add model prob
fb87dba added HW type to support various panda versions
820bf7b added tooDistracted event
1105dc1 different name
45c4249 add second model lead
f8c557f Log can errors from panda
04f105a back
ff93320 add lead stuff

git-subtree-dir: cereal
git-subtree-split: 4ea03ba

* Squashed 'panda/' changes from ae816c1..45d0d28

45d0d28 remove whitespace (commaai#255)
e49d0db Pedal: use avg between tracks (commaai#253)
c597dcc VERSION update after health packet changes and minor misra test change
01072be Misra 11.x: pointer usage. (commaai#250)
fd68c26 Propagate can_push errors (commaai#249)
ce1daf2 Misra check only done for EON config
70d4fd7 cleanup docker container on failure
04756a0 Turning back Misra check: unvoluntarily change
fcb1208 fix weird code in USB_ReadPacket
b983cc8 Re-wrote test_misra.sh
0b19206 Misra 17.7: The value returned by a function having non-void return type shall be used. We should hang on initial failed safety_set_mode
06ee8bd Ignore Misra 5.4 until cppcheck bug (?) is fixed
4be8582 Update cppcheck commit and pass predefined params to avoid impossible combinations of configs
f45dd04 cppcheck: ignore redundantAssignment and selfAssignment for registers in llcan.h
9ce6311 Misra 12.1 (operator order) and 10.4 (incompatible essential types) fixes, arised after properly checking UID_BASE config
1cd34e5 Explicitly set the define and undefine for unknown configs in misra checks
5a02499 remove esp flash from run_automated_tests.sh
23e3684 Cppcheck unused functions (commaai#247)
c97d60b Removed bad language
b031480 Missed adding Dockerfile
91ff6bb Run language checker in CI
205ec34 Improved language checker
f7bbab0 Language checker test
d9d0a62 Misra 5.5: missed this change from previous PR
85fa3c0 Misra 5.5: Identifiers shall be distinct from macro names (commaai#246)
190d604 Pedal: 2 minor fixes to Misra 15.7 (else needed) and 17.7 (non-void output must be used)
8ea01ff Pedal: no built-in functions to avoid puts and putc re-definitions
1f40d1e Misra pedal (commaai#245)
a4554e3 Ignore advisory Misra 19.2: the union keyword should not be used
e6dc417 Minor indent error
247e128 Fix strict compiler on bootstub build
ba68569 Removed build strict test and enabled -Werror flag
da11f0f safety replay: update openpilot-tools after logreader fix
fc8b9e4 Cppcheck: also check pedal
f7bd2c2 Misra 10.4: fix last 2 violations (commaai#242)
9be5fde finished misra 17.8 (commaai#241)
3c3aba3 Misra 10.4: Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category (commaai#240)
f2a3a17 Misra 15_7: fix what seems to be a false positive of cppcheck
812ace5 Misra 15_7: if … else if constructs should be terminated with an else clause (commaai#230)
79e9735 rename 5_wifi_udp.py
3c3ff0c Update Jenkinsfile (commaai#239)
1bd9284 Misra 17.7: the value returned by a function having non-void return shall be used (commaai#237)
18c9e88 Merge pull request commaai#238 from commaai/misra_17_8
7ac321d Merge pull request commaai#235 from commaai/memxxx
004e543 Jenkins: run EON test first
4bff286 Merge branch 'memxxx' of github.com:commaai/panda into memxxx
7cd80de typo
385e33b 12.1 regression
955842b WIP
ea908cb 10_1 violations: Operands shall not be of an inappropriate essential type (commaai#233)
fa33038 Fix Misra 5.3: An identifier declared in an inner scope shall not hide an identifier declared in an outer scope (commaai#236)
ebfe1c5 Merge branch 'master' of github.com:commaai/panda into memxxx
8c11470 Fix EON test case
64e18e8 fix inverted logic to differentiate between dev and EON panda builds
36755a0 Merge branch 'master' of github.com:commaai/panda into memxxx
e2981d6 skip wifi tests for EON panda build
db2eec9 Merge branch 'master' of github.com:commaai/panda into memxxx
11257e7 Ignore test 5_wifi_udp.py_ignore: too unreliable for now
6973c2a fix wifi tests
cf6985a memxxx function changes to be Misra compliant
3a6cd29 wifi threshold perc back to 20%. Problem wasn't this.
d92a035 faster docker build for safety replay
3e9469b Fixing tests after min->MIN  change
ecb9b6c Revert "Misra 10 1: Operands shall not be of an inappropriate essential type (commaai#232)"
8732e4f Misra 10 1: Operands shall not be of an inappropriate essential type (commaai#232)

git-subtree-dir: panda
git-subtree-split: 45d0d28

* Squashed 'opendbc/' changes from 38650f842..e1955ba06

e1955ba06 Nissan: Added nissan_2017.dbc (commaai#173)
c89eb71df properly generate Lexus 350 dbc file
d08059c77 Lexus RX 350 DBC (commaai#170)

git-subtree-dir: opendbc
git-subtree-split: e1955ba06e3308dbbfb4bcda78d0e6495bc9ff7e

* openpilot v0.6.1 release

* self.poller not used (commaai#759)

I do not see the need for zmq and the poller being initialized and not used.

* Remove offset from curvature (commaai#761)

* Update README.md (commaai#766)

* Squashed 'cereal/' changes from 4ea03ba..748002c

748002c angle calib desc
27db4a7 add camera rpy angle msg
a71c4fa deprecate old dm model output
6c6ab96 remove hwType from ThermalData. Decided to have health at higher freq instead. This will make last 24H of collected data unreadable. Sorry.
f27249e Add fields for LQR lateral control
654860c add decelForModel
995b558 add longitudinal plan source
222f2de add eye stuff
eebf268 hasGps is a better name than hasGpsAntenna
12da45f Blackpanda (#4)

git-subtree-dir: cereal
git-subtree-split: 748002c

* Squashed 'panda/' changes from 45d0d28..519e39e

519e39e Changed heartbeat timeout to be 2 seconds on no ignition
996dc40 Added heartbeat to black loopback testing
79b44cb bump version
59f5813 Black (commaai#254)
0964866 no need to store safety only misra output anymore

git-subtree-dir: panda
git-subtree-split: 519e39e

* Squashed 'opendbc/' changes from e1955ba06..7684440b1

7684440b1 chrysler: increase size of ACCEL_134 (commaai#174)

git-subtree-dir: opendbc
git-subtree-split: 7684440b14253f03b7420c4b24da5fbdeb0b9954

* openpilot v0.6.2 release

* Fix timeout in longitudinal test (commaai#772)

* Fix timeout in longitudinal test

* Update hyundaican for Correct Message ID on LKAS11 (commaai#746)

This is the only trace of CF_Lkas_Icon found under /car/hyundai relative to open .dbc

commaai/opendbc#172

* Revert "Update hyundaican for Correct Message ID on LKAS11 (commaai#746)" (commaai#775)

This reverts commit 1f1893a.

* Correct Message ID on LKAS11 under Openpilot .dbc (commaai#747)

commaai/opendbc#172

* Revert "Revert "Update hyundaican for Correct Message ID on LKAS11 (commaai#746)" (commaai#775)"

This reverts commit d5242c5.

* Remove Min Speed Steer Disengage

* Fix lane centering with single lane line (#38)

add fix of openpilot dev commaai#737

* Update STEER_DELTA_DOWN - Temp Remove CLU11 (#43)

* update min speed and support genesis

* Stock LKAS not allowed to enagage (@xx979xx)

* Reinsate CLU11 with xx979 changes

* panda

* bugs

* bug

* No  Low Speed (yet)

* fix checksumc error

* attempt fix of cjhecksum discover

* Low Speed Alert

* update version

* Update version
cfranyota pushed a commit to cfranyota/openpilot-retired that referenced this pull request Dec 5, 2019
@geohot
Copy link
Contributor

geohot commented Jan 17, 2020

If this pull request is still relevant, please resubmit it to the master branch. This should allow our development flow to work better, we commit to master, you commit to master, everyone commits to master!

@geohot geohot closed this Jan 17, 2020
@mrsparx
Copy link

mrsparx commented Mar 13, 2021

Where should i be looking for openpilot for AP1 cars? I saw "AP1 soon" somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet