Tesla

From comma wiki
Revision as of 19:59, 20 February 2019 by DeftDawg (talk | contribs)

Jump to: navigation, search


Welcome to the Tesla Openpilot Wiki!

We're just getting started filling this out, so feel free to jump in and help document things that need to be here.

This port is currently focused on bringing Openpilot to Teslas from 2014 and earlier, before Autopilot was offered.

Status of Latitudinal control (steering)

OpenPilot latitudinal control is working.

Electronic steering is present in pre-autopilot Teslas, but disabled. The Electric Power Assisted Steering units (EPAS) are capable of turning the steering wheel electronically if fed the right commands. With that in mind, we run a cable from the car's EPAS unit in the frunk to a comma.ai Panda. It allows us to:

  1. Intercept messages the car periodically sends that disable the EPAS' steering feature.
  2. Transmit steering commands from a comma.ai EON to the EPAS unit.

This setup allows the car to steer autonomously.

Status of Longitudinal control (accelerator and brakes)

Longitudinal control is an ongoing effort. These cars lack electronic pedal control and radar.

As of 2019 we have both software-only and hardware-based Adaptive Cruise Control.

Distance detection technique Precision Cost Status
Use the EON's computer vision Low None Implemented
Install a radar unit High ~$300 Under development
Speed control technique Brake power Min speed Installation Cost Status
Hijack normal cruise control commands Weak (regen only) 18mph None None Implemented
Install a comma.ai Pedal proxy Weak (regen only) 0mph Some assembly required. ~$100 Implemented
Install electrically controllable pedals Full 0mph Very difficult installation. >$600 Not implemented

Hardware Costs / Functionality / Limitations

Base Cost Functionality Limitations
EON (or FrEON) $500 Vision for Lane Keeping, Visual Radar, ACC, ALC Manual Braking -> Only automatic braking available is regenerative braking which is not sufficient.
Grey Panda $200 GPS and Can Bus, high resolution maps Visual Radar is not accurate -> ALC is blind!
Giraffe $200 CAN Bus - Steering, Cruise Control Manual Acceleration below 18MPH -> Acceleration is only possible when cruise control is active
EPAS Cable $100 Steering (you must make your own cable using the steps here)
Upgrades Cost Functionality
Pedal  ?? Accelerator Pedal Proxy - Allows automatic acceleration from 0 MPH
Ultrasonic Parking Sensors $200? Assist in ALC, possibly also with blindspot detection and maybe eventually auto-park
Radar retrofit $500? In dev - Allow for more accurate ACC
iBooster2 retrofit $1500? Allow car to brake to a stop through automation

Costs of materials / parts only, it is assumed you will do your own labor.


Adaptive Cruise Control

ACC allows the car to match speed with cars in front of you. The EON judges distances using the camera and dynamically adjusts cruise control speed. There are plenty of downsides to this strategy. The distance estimates are inaccurate. It only operates above 18 mph. The speed changes are not very smooth. And it can't handle sudden slowdowns so YOU MUST BE READY TO MANUALLY BRAKE AT ANY MOMENT. But it works without any new radar/pedal hardware.

To repeat, YOU MUST BE READY TO MANUALLY BRAKE AT ANY MOMENT!

Follow these steps to use ACC:

  1. Press the cruise stalk IN so that the orange "cruise control ready" LED on the stalk is lit.
  2. Enable the ACC option on screen if necessary.
  3. Accelerate above 18 MPH.
  4. Enable OpenPilot using a DOUBLE stalk pull (pull the cruise control stalk BACKWARDS TWICE in quick succession.) You will see the blue 'Cruise' icon appear on your dash. ACC is now active.
  5. The initial max speed may be conservative. Press UP on the stalk to increase it.
  6. Cruise is disabled if you brake or the car slows below 18 MPH.
  7. If ACC "AUTO" mode is enabled, manually accelerate above 18 MPH to resume.

Controls while ACC is enabled:

Control Action
Cruise stalk IN Master toggle for cruise control. Must be engaged for cruise or ACC to work.
Cruise stalk DOUBLE PULL Enable OP ACC and steering, and increase the max allowed ACC speed if necessary.
On screen ACC button Toggle between "FOLLOW" and "AUTO" mode. FOLLOW mode attempts to match speed with cars in front of you and disengages if you steer or brake. AUTO mode does the same, but automatically re-engages when you accelerate again.
Cruise stalk UP Increase cruise speed, increasing max allowed ACC speed if necessary.
Cruise stalk DOWN Decrease cruise speed and max allowed ACC speed.
Cruise stalk PUSH Disable OpenPilot (both steering and ACC). Max allowed ACC speed is reset to 0.
Brake pedal Pause both ACC and traditional cruise.
Accelerator (When in AUTO mode) Accel over 18 MPH to unpause ACC.

Community ToDo List

  • Need a writeup of creating the wiring harness for EPAS bypass
  • Need a writeup of installing the wiring harness
  • Need to compare comma code with ours, regarding continue.sh / launch_openpilo.sh / launch_chffr.sh so that on reboot it fetches our repo (auto update). Not all users want to ssh in to update
  • Open source giraffe hardware
  • Code change to OP port to auto flash panda
  • Add longitudinal control (this is a much larger issue than 1 bullet point)
  • Further testing of EPAS enable spamming
  • Have more Teslas using OP than any other car!!! :)
count Confirmed Users with Working OP Vehicle
1 Kalud 2013 S P85
2 zax123 2013 S P85
3 Bobby 2012 S P85
4 SteveRadich 2013 S 85
5 BogGyver 2014 S 85
6 RobP 2013 S P85
7 Edgar 2012 S P85
8 JJ 2013 S P85+
9 David Abrahams (Git:AllWashedOut) 2013 S 60
10 Shane Thomas 2013 S P85+
11 Alex V 2014 S 85
Bounty paid!
12 sergiociba 2013 S 60
13 Bentis 2014 S P85+
14 Moc 2014 S 85
15 Sid 2014 S 85
16 MarcMarin 2013 S 85
17 FlyBoyn222pa 2013 S 85
18 BastyJuice 2013 S 85
19 Harrison 2013 S 85
20 André Juneau 2012 P 85

Here's what you'll need to get OpenPilot working on your pre-AP Tesla

  • Panda (white $84, grey $199)
    • Grey Panda includes high accuracy GPS which OpenPilot may use for more accurate steering in the future. White panda won't work starting with OP 0.6, so Grey Panda is strongly recommended.
  • Custom Giraffe and Wiring harness for the Model S.
    • There are 2 variations of the giraffe based on your car manufacture date (before or after May 31, 2013). If you are unsure, check if the OBD connector in your driver footwell is the newer style with metal contacts for pins 1 and 9
    • Contact @appleguru in the #tesla channel on the comma slack to purchase a revB giraffe.

Total price of parts is approximately $1,000.

Instructions to set it all up

This first video walks you through the physical installation of parts from start to finish.

  • Make sure your Eon is up to date This will bring you to the latest version of OpenPilot and update your EON to the latest version of NEOS. If you have problems they aren't Tesla related, check the other wiki / slack places.
  • Install Panda on Giraffe OBDII port (driver footwell)
  • Run the 10 foot USB cable from the EON along your headliner, down the driver side A-Pillar, and down to the Panda
  • Connect EON to Panda via USB cable
  • Install custom tesla branch of OpenPilot on your EON by doing the following:
cd /data
mv openpilot openpilot.stock
git clone https://github.com/jeankalud/openpilot.git
cd openpilot
git checkout tesla
reboot
  • Update your Panda while SSH'ed in and Panda connected to ODB port and EON connected to Panda via USB (perhaps) - automated soon - Do we need to do this without data on bus?
cd /data/openpilot/panda/board
make
make recover
  • This is what it should look like for a successful flash. If you get something very different that has an error, check the connectivity between the EON and the Panda. Unplug it all and re-seat all the connections on Panda and giraffe.
root@localhost:/data/openpilot/panda/board$ cd /data/openpilot/panda/board;make                                    
PYTHONPATH=../ python -c "from python import Panda; Panda().flash('obj/panda.bin')"
opening device 41001d000651363038363036 0xddcc
connected
opening device 41001d000651363038363036 0xddee
connected
flash: version is v1.1.2-unknown-DEBUG
flash: unlocking
flash: erasing
flash: flashing
flash: resetting
opening device 41001d000651363038363036 0xddcc
connected
root@localhost:/data/openpilot/panda/board$
  • If you're having trouble with the Panda not flashing correctly, here's a few things to try:
Power cycle the Panda by unplugging it from the giraffe and reseating it again.

Run these commands on the EON to try and flash the Panda:

cd /data/openpilot/panda/board
killall boardd
make clean
make 
make recover


  • Once Panda is successfully flashed, you need to reboot EON again (WHILE the EON is connected to panda via USB).
  • Once everything is set up and working, you'll need to drive for 20-30 minutes above 45mph to complete calibration.
  • Once you're done with calibration, OP can be activated by one pull of the cruise stalk toward you. This is independent of whether the Tesla cruise control is turned on or not.

Enjoy!

Installation Tips

EPAS Cable

  • You can follow Deftdawg's EPAS creation video here: https://www.youtube.com/watch?v=TIKGK0Iabtc
    • NOTE: It is not recommended to solder the JST2 plugs prior to fishing the wire into the driver footwell, so pause watching this video around the 34minute mark. The fishing process can easily destroy JST2 solder joints, so it's better to fish the wire first and then strip and solder the connections on when the wire is already into the cabin.
  • Use velcro ties to secure the EPAS Cable to the existing harness in the car until you are sure everything works and you won't be needing to remove EPAS cable to work on it further.
  • Fish the unfinished end of the cable under the washer container, then through the first hood metal support piece to the gap and then pull all of the slack through that gap. Reinsert the unfinished end back into the gap while keeping a finger or screw driver under it to keep the cable from falling down flat into the gap, this will help the cable not catch on where the second metal hood support meets the body as you push the cable towards the cabin. Once the cable emerges next to the door seal, pull it through from the cabin side and work it in behind the seal and the diagnostics port.
  • Once the cable is in the gap between the driver left side footwell cover and the panel containing the OBD2 port, do your soldering of the JST2 connector.
  • Prior to connecting the cabling, it's a good idea to test your EPAS cable for continuity and shorts [this is for your sanity, nothing bad will happen if you skip this]
    • Shorts: with the EPAS cable not plugged into the Car or the giraffe, put spare pins into 2 and 5 and touch your leads to them. If you get continuity make sure that the pins are not in contact, if they are not in contact double check the insulation on your solder connections to your JST2 plug.
    • Continuity: with the spare pins still inserted in 2 and 5, jumper the JST2 plug end. Touch your leads to the 2 and 5 pins, if you get continuity make sure that the pins are not in contact, if they are not, then the cable is good. If you get no continuity, check that your solder connections to the JST2 plug haven't been broken.
  • Plug your panda into your giraffe, plug your giraffe into your OBD2 plug... The car may give you some error messages about parking brake, etc... Connect your EON to the panda via the USB cable. Turn on tethering in the EON and connect to the EON hotspot, then ssh to 192.168.43.1 port 8022 using the OpenPilot RSA key and flash your panda. Once flashing is complete, you can disconnect your EON again, remove and reinsert your giraffe, hopefully the car should not complain (if it does let us know, but continue anyway).
  • With a good cable, you can remove any testing jumpers and spare pins and connect to to the EPAS servo unit and connect it to the giraffe. Again the car should not complain. If you get an error that "Power Assist is not available", it means that your CAN +/- pins (2 and 5) need to be flipped. You test this by cross wiring a JST2 connector to a JST2 plug and then inserting that between your JST2 connector and EPAS cable... If you do this, you may need to put the car in drive and manually feel if power steering works before the error clears (if steering is normal the error should clear, if not it will feel very heavy). The easiest way to resolve this is to disconnect the JST2 cable from the giraffe and use a small edge to lift the plastic lock tab while depressing the spring clip to release the JST2 connects and then insert black in the red position and vice-versa, the plug the JST2 cable back into the giraffe, put the car in drive and recheck the steering.

Tucking the USB and Grey panda antenna cable into the Headliner

  • Pull your USB and GPS antenna cables from the footwell gap where the OBD2 port is up to where the "A" pillar is...
  • Follow the instructions to remove the air bag cover from the "A" pillar
  • Pull the USB and GPS antenna cables up the height of the "A" pillar across the the mirror holding them close to the headliner. Adjust the length and to reach where you will place your panda and your EON. The GPS receiver can be placed under the mirror Frit, it won't effect performance (the pattern is only to prevent glare on the mirror).
  • Drape the receiver and USB plug ends over the rear view mirror.
  • Move to the corner where the headliner and the removed airbag panel intersect, this corner is the easiest place to stick a pry tool... Using your pry tool lift the corner and move the pry-tool along the top of the windshield tucking the two wires into the headliner as you go. When you reach the mirror base, this can be lifted slightly route the GPS into the headliner crossing in between headliner and mirror base, while the EON USB cable can be routed down the front of the windshield to emerge at the bottom of the mirror base closer to the centre of the windshield.
  • Once the cabling is tucked in the headliner, move back to the "A" pillar and tuck the cable into the pillar cover routing it down towards the door seal, then secure the pillar cover to conceal the wiring.

First Troubleshooting steps:

  • If you're getting power steering errors after flashing panda, make sure you reboot EON while it's connected to Panda via USB
  • Try a different USB cable (a shorter one, or one with EMI filter)
  • Make sure you're using the correct tesla repo
  • run make in /data/openpilot/panda/board
  • make sure CAN-H and CAN-L are not reversed.
  • make sure there is a 120 ohms resistor across CAN-H and CAN-L going to the EPAS (power steering)
  • if using a custom harness ensure these:
    • car CAN on panda port 1 (first port)
    • EPAS CAN on last on port 3 (last one)
  • If everything looks correct (right code, right wiring, right everything), you can always try: Shutdown car ("Power Off" in car settings), wait a few sec and try again.
  • If you've broken your source control (wrong git command, etc) you can always backup/check out from scratch:
cd /data
mv openpilot openpilot.bak
git clone https://github.com/jeankalud/openpilot
cd openpilot
git checkout tesla
cd panda/board
make clean
sleep 5 # (Skip this if running commands individually.)
make
make recover 
reboot
  • If you are getting a message about having to recalibrate or re-position the EON, do this:
rm /data/params/d/CalibrationParams
reboot

How to change to the development branch of the Tesla OP port

Here's the commands to run on your EON to switch to the tesla_devel branch of the code

cd /data/openpilot
git fetch
git checkout tesla_devel
cd /data/openpilot/panda/board
make
reboot



How to transfer files to your EON

Sometimes while testing or debugging issues you may want to manually transfer files to your EON. One easy way to do this is to use the popular FTP client Filezilla.

  1. Enable SSH. Click on "Settings" in OpenPilot and make sure the "Enable SSH" option is turned on.
  2. Next find the ip address of your EON. Under Settings > Wifi settings > Advanced (click on the 3 dots in the upper right hand corner) scroll all the way to the bottom to find IP. (Make sure your EON is on the same wifi as your computer)
  3. Create a file called openpilot.ppk and save the text at the bottom of this section in it.
  4. In Filezilla, go to your Site Manager and create a new entry for your EON and enter the IP address you found in the Host field. The port is 8022. The protocol should be SFTP. Logon Type will be "Key File". User is "root". Key file is the file you just created. Then hit connect.

If you're having issues connecting, check to make sure you can ping your device on the IP you found. If ping doesn't work, then SSH won't either. You can try turning wifi off and then on again if you can't connect.

All the settings listed above can be used to connect via PuTTY as well for command line access. You specify the keyfile in the settings under Connection -> SSH -> Auth -> Private key for authentication

PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: imported-openssh-key
Public-Lines: 6
AAAAB3NzaC1yc2EAAAADAQABAAABAQC+iXXq30Tq+J5NKat3KWHCzcmwZ55nGh6W
ggAqECa5CasBlM9VeROpVu3beA+5h0MibRgbD4DMtVXBt6gEvZ8nd04E7eLA9LTZ
yFDZ7SkSOVj4oXOQsT0GnJmKrASW5KslTWqVzTfo2XCtZ+004ikLxmyFeBO8NOcE
rW1pa8gFdQDToH9FrA7kgysic/XVESTOoe7XlzRoe/eZacEQ+jtnmFd21A4aEADk
k00Ahjr0uKaJiLUAPatxs2icIXWpgYtfqqtaKF23wSt61OTu6cAwXbOWr3m+IUSR
UO0IRzEIQS3z1jfd1svgzSgSSwZ1Lhj4AoKxIEAIc8qJrO4uymCJ
Private-Lines: 14
AAABAQCEhXr8RxnaC92ecZMOqDuUkCjthsRHlYUczYJrvxwPqsfDq8qg+jtQlmON
N+5H7eolsZcIizncJ2tj9ubnlTNy8anUB9ikuA5pQsfpKuhcAoL9Ot30DzIQvS6V
opr2kEjxAu1VD40JaOLT2OrE02AVDodANYoUZv8e47irkAlosQqvAvw1ZwdV+Jho
/lt5yXOU8FSbYCW24ga6uj1q4bwf96ppMR0S+3VNkgW9ojURdSy2N9HScf3A+91A
yjR65a7I5N1CXNvTKePzJWnSr1JEajcJWMUrgLSVdJ2d/ohZC7N2nUkx3SaQpUHq
+OUedaxQ5VbA89mQaW/4UTUaBg7hAAAAgQDoDUSLEurtBg6HdxteHKHdbiSlW8D8
U98ofU4zLc404P9j05r4z/C2FbXBKhEvaf664hbk4CFMi8gSK+PpsBmxNPe3Cu86
u9i72vH1qWfinwGHK92N5biRLtPwU/miXoug63axM/dPUs64k865C86OUo8ogyHd
zdEU1ZOcbMw9rQAAAIEA0jNiPLxP3A2nrX0keKDI+VHuvOY88gdh0W5BuLMLovOI
Dk9aQFIbBbMuW1OTjHKv9NK+Lrw+YbCFqOGf1dU/UN5gSyE8lX/QFsUGUqUZx574
nJZnOIcy3ONOnQLcvHAQToLFAGUd7PWgP3CtHkt9hEv2koUwL4voikTP1u9Gkc0A
AACAPLxtzP7rcHi76uESO5e1O2/otgWo3ytjpszYv8boH3i42OpNrX0Bkbr+qaU4
3obY4trr4A1pIIyVID32aYq9yEbFTFIhYJaFhhxEzstEL3OQMLakyRS0w9Vs2trg
YpUlSBLIOmPNxonJIfnozphLGOnKNe0RWgGR8BnwhRYzu+k=
Private-MAC: 2af7f5a599fa35e22392b7770a2eb7a0be8718b7


Editing your Bash Profile

In order to edit the .bash_profile on the EON, first you have to move your the home directory by typing

cd

Then, you have to mount the file system in Read/Write mode by typing

mount -o rw,remount /system

At this point you can edit your .bash_profile file by typing

vi .bash_profile

First, locate the PYTHONPATH line and delete it. Then, at the end of your file, paste the following code

# add these symlinks if you want
export PYTHONPATH="/data/openpilot"
export GIT_SSH_COMMAND="ssh -i /data/gitkey"
cd /data/openpilot/selfdrive/car/tesla
alias cdo='cd /data/openpilot'
alias cdt='cd /data/openpilot/selfdrive/car/tesla'
alias cdp='cd /data/openpilot/panda/board'
alias sop='grep -rni --include=\*.{py,h,c} /data/openpilot/ -e '
alias mrw='mount -o rw,remount /system'
alias dbp='python /data/openpilot/panda/tests/debug_console.py | grep -v "can_push failed"'
alias vic='vi /data/openpilot/selfdrive/car/tesla/carcontroller.py'
alias vii='vi /data/openpilot/selfdrive/car/tesla/interface.py'
alias vit='vi /data/openpilot/selfdrive/car/tesla/teslacan.py'
alias vis='vi /data/openpilot/selfdrive/car/tesla/carstate.py'
alias viu='vi /data/openpilot/selfdrive/ui/ui.c'
alias lop='cd /data/openpilot;./launch_openpilot.sh'
alias gp='git commit; git push'
alias sp='/data/data/com.termux/files/continue.sh'

Save the profile and you're done! If you contribute code, you might also at this point want to configure your git to save your username and password. To do that you just to a push when you still have the file system in RW mode ( or you can use the *mrw* command later to make it RW)

$ git config credential.helper store
$ git push https://github.com/repo.git
Username: <type your username>
Password: <type your password>
$ git push https://github.com/repo.git
[your credentials are used automatically]


Keep in mind the credentials are stored in

.git-credentials

in plain text. They are in the format

https://user%40email.com:pass@github.com

where *user@email.com* is your username and *pass* is your password. So you can also just edit that file and modify as needed. Just replace *@* with *%40* in your email address. Now, about those shortcuts above:

mrw - make read / write - makes the file system writeable
sop - search OpenPilot - searches the whole OP structure for the keyword that follows - example: sop user_brake
sp - starts OpenPilot after you killed it with tmux -a
dbp - debug panda - launches the debugger for panda
gp - git commit and push - if you saved your credentials this makes commit and push so easy; just add your comment and you're done
cdt - change directory to /data/openpilot/selfdrive/car/tesla folder; this is also the folder when you will now start every time you ssh into your EON
cdo - change directory to /data/openpilot
cdp - change directory to /data/openpilot/panda/board
vic - starts vi for /data/openpilot/selfdrive/car/tesla/carcontroller.py from any folder
vii - starts vi for /data/openpilot/selfdrive/car/tesla/interface.py from any folder
vis - starts vi for /data/openpilot/selfdrive/car/tesla/carstate.py from any folder
vit - starts vi for /data/openpilot/selfdrive/car/tesla/teslacan.py from any folder```


Script to auto delete files to keep EON from filling up

This script comes courtesy of @Sid and updated for OP0.5 by @Tentious

Save the following script and run it on your EON. It will install into a cron job a script that checks every hour to see if you're almost full and delete the oldest files if necessary.

https://gist.github.com/tentious/b0de19dfecefc2547b4a07c31174aac3

Aligning your EON

What you need

  • Measuring tape
  • Masking tape
  • A friend to help

Instructions

  1. Find a place at the bottom of the windshiled along the driver side pilar that has a similar position on the passenger side (I used the place where the corner of the front hood meets the fender).
  2. With the tape starting from that point, mark 3 places along the side of the windshiled. Use the endge of the masking tape to mark them. I personally used 3" from the bottom, the top of the windshield and then about 1/3 from the bottom, 2/3 from the top. It does not matter what the measuring tape says, as long as it says the SAME distance on both sides.
  3. Repeat the process on the other side of the windshiled, ensuring you mark the same spots.
  4. measure the distance between one edge of the windshield and the other end, keeping the tape at each pair of marked points from before. use masking tape to mark the middle of the windshield. again, use the EDGE of the tape, not the center.
  5. Now use a long piece of masking tape to mark the center of the windshield from top to bottom. This (if you did everything correctly) will cover all 3 of your markers from before and provide a straight line. One edge of the masking tape is now the perfect middle of the windshild. Your mount will have to be aligned with that for a perfect position.
  6. Take a small piece of tape and mark the middle of the GoPro mount. use a slighly longer piece that the go-pro (maybe 1/4-1/2" more on each side) and ensure it is straight and down the middle of the GoPro. If, when looking from inside of the car, your take is to the RIGHT of the center, then put the tape on the LEFT side of the GoPro. Reverse if the other way.
  7. Using your EON without the mounting braket, determine the location along the center of the windshield where you want it placed.make sure the grove on the support is alongside the center of the windshield. use a small piece of maksing tape to mark the upper part of the position where you want your EON to be.
  8. Remove the RED protective tape from the back of the 3M adhesive and be ready to place the GoPro on the windshiled. Align the masking tape we placed on the GoPro mount on the inside with the masking tape we have on the outside of the windshield. They shoud not overlap at all AND you should not see light either. when you are confident on the position press hard on the mount.
  9. Remove all masking tape. You are done. You now have a perfectly centerd, perfectly vertical EON.


Placeholder for pedal instructions

Getting pedal physically in the car: Tesla chip is a similar install

Flashing: Guide to flashing the pedal

Best way to flash it is to connect pedal straight to EON, go to panda/board/pedal and just type

make recover

Summarized wiring info from Slack user Sid:

  1. Wire the connectors to the board on the left and right sides of the Pedal using this diagram: https://i.imgur.com/kmH0CBR.png
  2. If you have no RJ45 connector, connect RJ45 pin 7 to the EPAS high, and RJ45 pin 8 to the EPAS low.
  3. If you do have an RJ45 Connector, Cut one end of the ethernet cable and connect the White-Brown Wire to EPAS High, and Brown wire to EPAS low.
  4. The best way to do this is by making a Y cable that goes into the EPAS connection on the giraffe, turning the (giraffe -> EPAS) connection into (giraffe -> EPAS + Pedal)


Most of the action is happening in the #tesla channel on the comma slack: https://comma.slack.com

Current Tesla branch URL: https://github.com/jeankalud/openpilot/

BogGyver pedal branch URL: https://github.com/boggyver/openpilot/tree/tesla_pedal

Some background info on the tesla port: http://openpilot.robertcotran.com/

Last known safe Tesla software update version: 2018.46.2

Glossary/Acronyms

ABS/iBooster/ESP2
AntiLock Braking System, iBooster - a component that allows brakes to applied via electronic control, Electronic Stability Program. These are parts of the automatic braking system that are found on AP1 and later cars. Using EON to control brakes is not feasibly possible on pre-AP Teslas. There has been some talk of upgrading AP0 Teslas to have this hardware, but this is a major undertaking and requires root access.
AP, AP0, AP1, AP2, AP2.5
Tesla AutoPilot. AP0 or pre-AP means no AutoPilot. AP1 is the version 1 using Mobileye technology. AP2 ditched the Mobileye components and is all Tesla parts and software. AP2.5 is upgraded AP2 hardware.
cabana
Comma's system for playing back and showing the recorded data from uploaded drives.
CAN,CAN-bus
Controller Area Network This is a network system inside cars that allow messages to be sent to different auto components. With the Giraffe/Panda/EON setup described above, the Panda's CAN bus 0 is for chassis messages and CAN bus 2 is for the isolated EPAS. The Panda proxies messages between the two (except for the EPAS kill message which is blocked.)
Chassis Can
Steering and braking controls are found on this CAN-bus, so this is the main one that OP uses.
CID
Center Information Display. Same thing as the MCU, ie, the big screen in the Tesla.
DAS
Driver assistance system - the AP1 camera/computer module located behind the windshield on AP1 hardware cars
DBC
DataBase Container These are files that contain the definitions of the messages cars send on the CAN-bus.
Diag, Diag port
Diagnostic port that can be found under the MCU (screen) in a Tesla. Chassis-CAN is able to be accessed from this port.
DPDT
Double Pole Double Throw. It's a type of switch that some use in their wiring harness.
EON
Main hardware component that Comma sells. It's the brains that runs OpenPilot.
EPAS/EPS
Electronic Power (Assisted) Steering. This component allows OP to move the steering wheel.
flash
Process of installing software on embedded hardware.
Giraffe
Piece of hardware that allows the Panda to interface with the OBD port in the car.
IC
Instrument Cluster. The screen behind the steering wheel that has the speedometer on a Tesla.
LKAS
Lane Keeping Assist System. System built into cars to automatically steer to keep the car in the current lane.
MCU
Media Control Unit - The big screen in a Tesla.
MRR
Mid Range Radar. Modern cars use radar units to see objects around the car. Pre-AP Teslas don't have any radar units.
MS, MX, M3
Model S, Model X, Model 3. The current Tesla lineup.
NEO
The predecessor to the EON. A customized OnePlus3 phone with a custom hardware board attached that also can run OpenPilot.
NEOS
The operating system softare that runs on the EON.
OBD, OBDii, OBDII, OBD2
OnBoard Diagnostics This is a port in the driver footwell that would normally provide emissions diagnostics on most cars, but is useless for that on Teslas. For Teslas built after May 31, 2013, Chassis CAN-bus is able to be accessed from this port.
OP
OpenPilot
Panda
Piece of Comma hardware that plugs into the OBD port to access the Chassis CAN-bus to send steering and braking messages from OpenPilot running on the EON.
PCB
Printed Circuit Board
PCM
Powertrain Control Module. This component basically tells the car how much power to put out to make the car go.
PR, pull request, merge
Pull requests or merge refers to a request to integrate code written by others to be "pulled" into the OpenPilot software maintained by Comma.
Repo, git repo
Repository where software is stored. The code for the Tesla version of OpenPilot currently sits in a different repo than the main OpenPilot code.
root, root access
Process of gaining access into the Tesla sofware system at a root level that allows access internal diagnostic not normally available and also allows for changes to be made to the Tesla software.
SCCM
Steering Column Control Module - This component is part of the steering column and controls all the messages sent from the buttons on the steering wheel as well as the cruise control stalk.
SOC
State Of Charge. The percent of power left in your car's battery pack.
SSH
Secure SHell - a method of connecting to your EON in order to be able to make changes to it and issue commands for it to run.