Tesla

From comma wiki
Revision as of 06:04, 15 June 2018 by Snowy (talk | contribs) (First draft Glossary)

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 the Pre-AP Teslas from 2014 and earlier. The EPAS (Electric Power Assisted Steering) unit on these pre-AP Teslas is capable of steering itself based on electronic commands like the AP1 and 2 Teslas, but since they don't have autopilot there's a kill signal that is sent to disable this feature. Because of this, we have to proxy the CAN-bus messages through the panda which will alter that kill signal and change it to an enable signal. To accomplish this, you have to remove the frunk liner to get at the EPAS unit, and unplug the factory cable and plug in a bypass cable that allows for this proxying. This cabling also allows OpenPilot to send the steering commands to the car.


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

  • Panda or Grey Panda (Grey Panda costs 2x as much and includes high accuracy GPS which may be helpful in the future for more accurate steering)
  • Tesla Giraffe and Wiring harness. Contact @appleguru in the #tesla channel on the comma slack to arrange purchase. There are 2 different types of Giraffe, so you need to know if your car was manufactured before or after May 31, 2013


Instructions to set it all up

(this is very much in progress and not yet complete)

  • 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 the wiring harness to the EPAS unit and the OBDII port in the driver footwell
  • 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:
  1. cd /data
  2. mv openpilot openpilot.stock
  3. git clone https://github.com/jeankalud/openpilot.git
  4. cd openpilot
  5. git checkout tesla
  6. 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?
  1. cd /data/openpilot/panda/board
  2. killall boardd
  3. make clean
  4. make recover
  5. make


Enjoy!



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/

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

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 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.
Chassis Can
Steering and braking controls are found on this CAN-bus, so this is the main one that OP uses.
DAS
?
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.
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.
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.
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.