Configuring OpenPilot

From comma wiki
Jump to: navigation, search

If you have a supported car and have correctly Installing Giraffe and Installing EON and Installing OpenPilot on the EON you should be able to boot OpenPilot, turn your car on, and your car should be detected and a drive should start. If your car is properly detected, you will see a blue line indicating your steering angle which will move as you move your steering wheel, and as you get going you will see your speed represented in MPH.

If your car is not yet supported by OpenPilot, you will still probably see the video, but you won't see your steering angle or MPH. Don't despair, as long as you have configured the switches properly (see Installing Giraffe) you will get all of the information you need on Cabana to decode your CANBUS signals and figure out how to modify OpenPilot.

In order to login to your EON via SSH, use the following key:

-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC+iXXq30Tq+J5N
Kat3KWHCzcmwZ55nGh6WggAqECa5CasBlM9VeROpVu3beA+5h0MibRgbD4DMtVXB
t6gEvZ8nd04E7eLA9LTZyFDZ7SkSOVj4oXOQsT0GnJmKrASW5KslTWqVzTfo2XCt
Z+004ikLxmyFeBO8NOcErW1pa8gFdQDToH9FrA7kgysic/XVESTOoe7XlzRoe/eZ
acEQ+jtnmFd21A4aEADkk00Ahjr0uKaJiLUAPatxs2icIXWpgYtfqqtaKF23wSt6
1OTu6cAwXbOWr3m+IUSRUO0IRzEIQS3z1jfd1svgzSgSSwZ1Lhj4AoKxIEAIc8qJ
rO4uymCJAgMBAAECggEBAISFevxHGdoL3Z5xkw6oO5SQKO2GxEeVhRzNgmu/HA+q
x8OryqD6O1CWY4037kft6iWxlwiLOdwna2P25ueVM3LxqdQH2KS4DmlCx+kq6FwC
gv063fQPMhC9LpWimvaQSPEC7VUPjQlo4tPY6sTTYBUOh0A1ihRm/x7juKuQCWix
Cq8C/DVnB1X4mGj+W3nJc5TwVJtgJbbiBrq6PWrhvB/3qmkxHRL7dU2SBb2iNRF1
LLY30dJx/cD73UDKNHrlrsjk3UJc29Mp4/MladKvUkRqNwlYxSuAtJV0nZ3+iFkL
s3adSTHdJpClQer45R51rFDlVsDz2ZBpb/hRNRoGDuECgYEA6A1EixLq7QYOh3cb
Xhyh3W4kpVvA/FPfKH1OMy3ONOD/Y9Oa+M/wthW1wSoRL2n+uuIW5OAhTIvIEivj
6bAZsTT3twrvOrvYu9rx9aln4p8BhyvdjeW4kS7T8FP5ol6LoOt2sTP3T1LOuJPO
uQvOjlKPKIMh3c3RFNWTnGzMPa0CgYEA0jNiPLxP3A2nrX0keKDI+VHuvOY88gdh
0W5BuLMLovOIDk9aQFIbBbMuW1OTjHKv9NK+Lrw+YbCFqOGf1dU/UN5gSyE8lX/Q
FsUGUqUZx574nJZnOIcy3ONOnQLcvHAQToLFAGUd7PWgP3CtHkt9hEv2koUwL4vo
ikTP1u9Gkc0CgYEA2apoWxPZrY963XLKBxNQecYxNbLFaWq67t3rFnKm9E8BAICi
4zUaE5J1tMVi7Vi9iks9Ml9SnNyZRQJKfQ+kaebHXbkyAaPmfv+26rqHKboA0uxA
nDOZVwXX45zBkp6g1sdHxJx8JLoGEnkC9eyvSi0C//tRLx86OhLErXwYcNkCf1it
VMRKrWYoXJTUNo6tRhvodM88UnnIo3u3CALjhgU4uC1RTMHV4ZCGBwiAOb8GozSl
s5YD1E1iKwEULloHnK6BIh6P5v8q7J6uf/xdqoKMjlWBHgq6/roxKvkSPA1DOZ3l
jTadcgKFnRUmc+JT9p/ZbCxkA/ALFg8++G+0ghECgYA8vG3M/utweLvq4RI7l7U7
b+i2BajfK2OmzNi/xugfeLjY6k2tfQGRuv6ppTjehtji2uvgDWkgjJUgPfZpir3I
RsVMUiFgloWGHETOy0Qvc5AwtqTJFLTD1Wza2uBilSVIEsg6Y83Gickh+ejOmEsY
6co17RFaAZHwGfCFFjO76Q==
-----END PRIVATE KEY-----

it was extracted from neos_v3.zip file from here With that key you can SSH in as root on port 8022. If you're using PuTTY, you'll need to convert that rsa_id (private key) into a .ppk (PuTTY Private Key)... no passwords needed.

To connect to your EON using this key, save the text above to a blank text file and name the file key.pem. Then get the IP address of your EON in settings under settings > wifi > advanced. Using a linux machine, use the command: ssh root@(IP address of EON) -p 8022 -i key.pem

This is the same key in PuTTY ppk format:

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

To use it in PuTTY, just be sure to reference that .ppk under... Connection > SSH > Auth > Private key for authentication

To set your timezone...

  1. setprop persist.sys.timezone "US/Pacific"

...or whatever your timezone is.

Many users who are working on a non-default branch will want to switch OpenPilot to a different branch Note: Only required if you want to test code other than Comma's.(For example: vanillagorillaa's Honda Pilot/RDX port in progress). To switch your git branch, this is the recommended procedure: SSH into NEOS, then...

  1. cd /data
  2. mv openpilot openpilot.stock
  3. git clone < Github URL>
  4. cd openpilot
  5. git checkout <desired_branch>
  6. reboot

Note: The most common branches are 'release' and 'devel'. After the reboot, it can take up to 10 minutes to install the update. The Comma.ai github URL is https://github.com/commaai/openpilot

OpenPilot will need to rebuild a bunch of stuff after the reboot, so it'll take some extra time, sometimes up to 30 minutes. Be patient!

If your branch gets updated later, you can pull it like this, since rebooting alone won't necessarily work...

  1. cd /data/openpilot; git pull; reboot

If you'd like to make git edits from the NEOS, be sure to reset your git username and email address...

  1. cd /data/openpilot
  2. git config user.name "Mona Lisa"
  3. git config user.email "MonaLisa@davinci.it"

You need to update this in the project, not your global git config, because your home directory is read-only.

The OpenPilot software is started from /comma.sh from the init scripts in the root directory. It runs PYTHONPATH=/data/openpilot /data/openpilot/selfdrive/manage.py under a tmux session, so you can attach to the tmux session to see what's going on. Beware that the tmux action key (usually b) has been remapped to ` (backtick) on NEOS.

OpenPilot logs sessions under /data/media/0/realdata/ in datestamped directories. The "rlog" log file is readable using the "capnp" tool, for example you can read the Event type messages with this command line: $ capnp decode /data/openpilot/cereal/log.capnp Event < /data/media/0/realdata/datestamp/rlog | less

[Waking up the screen w/ a quick tap is necessary when initially connecting.]

This is a really nice guide to OpenPilot internals

At this point your best bet is to visit #openpilot on comma.slack.com and/or the forums