Difference between revisions of "Welcome to Tinkla!"

From Tinkla: Tinkering with Tesla
m
m (v0.9.6-61 (2024-01-17))
 
(73 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In early 2018 I got involved with the [https://comma.ai Comma.ai] [https://github.com/BogGyver/openpilot OpenPilot] project. The more I got involved, the deeper I wanted to integrate OpenPilot with my Tesla Model S for a better experience. Today, by just looking at the instrument cluster (IC) or the  center instrument display (CID) you would not know if the car is equipped with the Tesla original AutoPilot (AP1) or with our version of OpenPilot for Tesla.  
+
If you're looking for instructions for the old versions of OpenPilot that run on EON with white or gray panda, that page is available [[Old versions of OP|here]].
<div style="text-align: center;">
+
__NOTOC__
<youtube>z_Kon2P4yFs</youtube>
+
[[Talk: Feedback? Ideas? Comments?]]
 +
 
 +
==What is OpenPilot==
 +
 
 +
OpenPilot is open source software built to improve upon the existing driver assistance in most new cars on the road today. Now OpenPilot is available for pre-autopilot Tesla Model S as well as Tesla Model S/X with autopilot hardware 1 or 2.
 +
 
 +
Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW) and Lane Departure Warning (LDW) for a growing variety of supported car makes, models and model years. In addition, while openpilot is engaged, a camera based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about the vehicle integration and limitations.
 +
 
 +
==Getting Started==
 +
 
 +
# [[OpenPilot for preAP Tesla ModelS]]
 +
# [[OpenPilot for Tesla Model S/X with AP1]]
 +
# [[OpenPilot for Tesla Model S/X with AP2]]
 +
 
 +
== Software Design History ==
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.9.6-61 (2024-01-17) ===
 +
<div class="mw-collapsible-content">
 +
* in line with latest code from Comma
 +
* adds support for C3X
 +
* adds fixes for "steering temporary unavailable"
 +
* you can now chose between OP/AP1/ACC on cars with AP:
 +
  - OP - single stalk pull
 +
  - AP - double stalk pull
 +
  - ACC (Tesla stock) - up/down stalk movement
 +
* improved IC integration for cars with AP:
 +
  - when OP/AP now engaged, IC shows AP data
 +
  - when OP is engaed, IC shows OP data
 +
  - when AP is engaged, IC shows AP data
 +
* option to ignore radar errors (useful in winter time when radar might get dirty)
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
 
 +
=== v0.8.13-57 (2022-11-17) ===
 +
<div class="mw-collapsible-content">
 +
* Fix pedal pressed message on ACC
 +
* Adjust top speed with speed limit for AP1
 +
* Show set speed in lower right corner for RHD cars
 +
* Brake factor speed adjustable (1.1 below 70km/h, 1.4 above 110km/h)
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-56 (2022-11-08) ===
 +
<div class="mw-collapsible-content">
 +
* Sound files volume fix
 +
* Show TACC icon on IC for AP cars when OP is available
 +
* Display shutdown
 +
* Engage at 0 MPH (AP cars)
 +
* Fleet based speed (AP cars)
 +
* Slow down in turns based on SunnyPilot
 +
* prevent iBooster from pressing both pedals
 +
* Improved acceleration handling for AP1
 +
* Add message ID for the CAN Error
 +
* Reduce min accel to -4.5
 +
* Improve follow distance
 +
* Better and smoother pedal with 4 profiles
 +
* Universal calibration tool for pedal interceptor
 +
* iBooster control improvement
 +
* Add 5 pedal profiles and 3 acceleration profiles for better long control wiht pedal
 +
* Add alert when maximum regen is used with pedal to show braking limit
 +
* Prevent PCC engagement with uncalibrated pedals
 +
* Cancel automatic lane change on blinker or wheel touch
 +
* Toggle to ignore wrong date/time on device
 +
* Increase steering angle limits on Panda
 +
* Fix Controls Mismatch when taking over steering
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-55 (2022-09-21) ===
 +
<div class="mw-collapsible-content">
 +
* Sound toggles (to mute certain sounds)
 +
* Sound files
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-54 (2022-09-19) ===
 +
<div class="mw-collapsible-content">
 +
* Add capabilities for Str params
 +
* Implement fixed fingerprint option to avoid fingerprinting issues
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-53 (2022-08-05) ===
 +
<div class="mw-collapsible-content">
 +
* iBooster ECU fixes
 +
* Try to fix Controls Mismatch issues
 +
* Add toggle for radar error with AP
 +
</div>
 +
</div>
 +
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-52 (2022-08-05) ===
 +
<div class="mw-collapsible-content">
 +
* Reset Pedal PID on engagement
 +
* Toggle for Model S Performance for pedal (bug fix)
 +
* Pedal profile for MS Performance (bug fix)
 +
* Toggle to prevent auto updates
 +
* Toggle for dev unit (bug fix)
 +
* Autoresume speed from stand still
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-51 (2022-07-05) ===
 +
<div class="mw-collapsible-content">
 +
* new PID for pedal, including way to save state
 +
* toggle for Model S Performance for pedal
 +
* pedal profile for MS Performance
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-48 (2022-05-18) ===
 +
<div class="mw-collapsible-content">
 +
* limit iBooster travel to a max of 15mm (90psi on my car)
 +
* set Hold values for iBooster to 6.5mm (14psi)
 +
* change lane poly calculation logic for IC integrtion
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-47 (2022-05-11) ===
 +
<div class="mw-collapsible-content">
 +
* do not send iBooster brake command when real accelerator pedal is pressed
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-46 (2022-05-10) ===
 +
<div class="mw-collapsible-content">
 +
* do not send iBooster brake command when accelerator pedal is pressed
 +
* increase brake hold value
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-45 (2022-05-09) ===
 +
<div class="mw-collapsible-content">
 +
* update firmware for Vacuum Sensor board with brake release condition
 +
* allow 0x553 for iBooster in panda
 +
* allow 0x555 for IVS in panda
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-44 (2022-05-04) ===
 +
<div class="mw-collapsible-content">
 +
* update firmware for Vacuum Sensor board
 +
* fix CRC for iBooster
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-43 (2022-04-21) ===
 +
<div class="mw-collapsible-content">
 +
* fix Pedal over CC issues when MCU2 or no Tinkla Buddy
 +
* add firmware for Vacuum Sensor board
 +
* fix CRC for iBooster
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-41 (2022-04-19) ===
 +
<div class="mw-collapsible-content">
 +
* fix startup screen for C3
 +
* fix modem initialization for C3 (comma three: correctly set initial EPS bearer settings for AT&T sim cards)
 +
* fix logic for enabling OP on preAP MS
 +
* add C3 Tinkla Splash
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-38 (2022-04-05) ===
 +
<div class="mw-collapsible-content">
 +
* toggle to allow move of maps on left
 +
* always show OP data on IC when engaged (AP1/AP2)
 +
* Comma three support
 +
* fix top speed indicator when using pedal with Tinkla Buddy
 +
</div>
 
</div>
 
</div>
  
[[Feedback:Ideas? Comments?]]
+
<div class="toccolours mw-collapsible mw-collapsed">
  
== Getting started ==
+
=== v0.8.13-37 (2022-04-01) ===
[[File:Tesla OP Diagram.png|800px|frameless|center]]
+
<div class="mw-collapsible-content">
 +
* added configuration value for HandsOnLevel before human takeover
 +
* fixed acceleration for AP1 stop-and-go which was limited at 1.2m/s^2
 +
* added testing toggle for full LongControl from planner vs actuator (AP1 or preAP with iBooster)
 +
* fixed release scripts
 +
* fixed automatic flashing of panda code
 +
</div>
 +
</div>
  
* Please read and understand the [[Tinkla:General_disclaimer|Disclaimers and Licensing]].
+
<div class="toccolours mw-collapsible mw-collapsed">
* When creating harnesses, please use the [[AWG chart]] to select the right wire gauge for your amps and length needs.
+
 
* Many of the options and features are configured and enabled through the [[OpenPilot Configuration File]].
+
=== v0.8.13-34 (2022-03-27) ===
* Out of the box (well, just few easy mods to your Tesla), OpenPilot does a fairly good job at lane keep assist (LKA) and introduces a limited adaptive cruise control (ACC) based on the OpenPilot vision radar and just regenerative (regen) braking. Also, the system has a built in lane departure warning (LDW). All you would need is an [[The EON|EON]], a [[The Panda|Panda]], a [[Tesla Giraffe]] and a fairly easy to make [[EPAS harness]].The cost for this complete setup is about $1,000 USD when getting all the components from Comma.ai and ebay (for the harness)
+
<div class="mw-collapsible-content">
* [[The Comma.ai Pedal]] is a small unit that gets connected between your accelerator pedal on your model S and the Giraffe. While the stock cruise control on Tesla only works above 18 MPH, with the pedal we can control speed down to 1 MPH (though the regen brakes only work above 5 MPH). The benefit of the pedal is better (and smoother) adaptive cruise control over just the stock one.
+
* full support for OP long control with AP1
* [[Root Access To IC and CID|If you have access to the CID and IC on your Tesla]] (aka have root access), then you can follow some simple steps for turning on the IC and CID integration. This will allow you to visualize the path and cars on our Tesla's IC as well as control OpenPilot features from your Tesla's CID. This part is free as just involves some config changes on your Tesla.
+
* follow distance is adjustable from CC stalk (when available)
* [[Tesla Bosch Radar|With few more wires and a harness (plus some ebay parts) you can add a Tesla Bosch radar]] to your pre-AP1 car. With full radar integration now available in OpenPilot, you get more accurate lead car detection which leads to a better ACC (still limited to regen braking). Also, if you have the IC integration, now you can see 3 lanes full of cars on your IC.
+
* UI shows multiple road lanes when detected by OP
* [[Map Integration|Comma.ai has brought map integration]] for longitudinal control (slowing down in turns for example) few releases ago and there are plans to start bringing map info into lateral control as well to improve turning. Map integration is a key component for us too in order to improve the turning capabilities of the system.
+
* fix bug where ACC would show disabled message after brake press even when not enabled
* The next steps for us is integration with iBooster brakes for full stop and go traffic. This will require the replacement of the sandard vacuum brakes on your pre-AP1 Model S with the iBooster system that Tesla used in the AP1 cars and beyond. This will be about $500-$800 in parts and some more involved mechanical work as you would need to flush your brakes and such. Also, root access is needed for this upgrade.
+
* variable acceleration based on speed for AP1 OP based long control
* Finally, we will be integrating the AP1 style parking sensors into the OpenPilot code, allowing us to use the data from the 12 sensors to detect cars next to us. This is one step I'm hoping to start in the next month. Depending on where you source the sensors and harness, this by itself can be somewhere between $500 and $1,500.
+
* improve pedal tune (by vandreykiv)
* Once all this will be done, we will actually be able to fully integrate with AP1 cars as well. With Tesla no longer paying any attention to the older Model S (the [https://en.wikipedia.org/wiki/Tesla_Autopilot#Hardware_1 AP1] was based on the MobileEye platform that Tesla dumped in October 2016 and has received limited code updates ever since), the only option to get new features and functionality is by joining the [https://community.comma.ai/wiki/index.php/Tesla OpenPilot group].
+
* fix variables default value not showing correctly in UI
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-33 (2022-03-26) ===
 +
<div class="mw-collapsible-content">
 +
* new events to show when Standard CC is enabled
 +
* added shutdown timeout for device (vandreykiv)
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-32 (2022-03-20) ===
 +
<div class="mw-collapsible-content">
 +
* allows Standard CC (no LKAS) to be used with pedal when cruise enabled
 +
* allows Standard CC (no LKAS) to be used with ACC by double press down
 +
* allows for pedal to be used over CC (when setting enabled)
 +
</div>
 +
</div>
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed">
 +
=== v0.8.13-31 (2022-03-18) ===
 +
<div class="mw-collapsible-content">
 +
* based on v0.8.13 (latest release from Comma)
 +
* requires EON Gold/Black Panda or Comma two/three
 +
* no need for EPAS harness
 +
* Panda flash built in UI
 +
* Pedal flash built in UI
 +
* EPAS patching built in UI
 +
* Radar VIN Learner built in UI
 +
* radar behind nosecone setting as part of VIN Learn (set via UI)
 +
* works with either human long control, ACC or pedal
 +
* no more ssh to install or update
 +
* no more ssh to change any settings, all done through UI
 +
* automatic change top speed based on speed limit and offset (either units or %)
 +
* automatic lane change with adjustable delay
 +
* human steering override with adjustable delay for re-engagement
 +
* steering never disengages unless you cancel it via stalk
 +
* adjustable follow distance though UI
 +
* allows for CC without LKAS when using Pedal
 +
* pedal can be on either CAN0 or CAN2 (set via UI)
 +
* support for iBooster ECU (in dev)  
 +
 
 +
</div>
 +
</div>

Latest revision as of 04:04, 18 January 2024

If you're looking for instructions for the old versions of OpenPilot that run on EON with white or gray panda, that page is available here.

Talk: Feedback? Ideas? Comments?

What is OpenPilot

OpenPilot is open source software built to improve upon the existing driver assistance in most new cars on the road today. Now OpenPilot is available for pre-autopilot Tesla Model S as well as Tesla Model S/X with autopilot hardware 1 or 2.

Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW) and Lane Departure Warning (LDW) for a growing variety of supported car makes, models and model years. In addition, while openpilot is engaged, a camera based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about the vehicle integration and limitations.

Getting Started

  1. OpenPilot for preAP Tesla ModelS
  2. OpenPilot for Tesla Model S/X with AP1
  3. OpenPilot for Tesla Model S/X with AP2

Software Design History

v0.9.6-61 (2024-01-17)

* in line with latest code from Comma
* adds support for C3X
* adds fixes for "steering temporary unavailable"
* you can now chose between OP/AP1/ACC on cars with AP:
 - OP - single stalk pull
 - AP - double stalk pull
 - ACC (Tesla stock) - up/down stalk movement
* improved IC integration for cars with AP:
 - when OP/AP now engaged, IC shows AP data
 - when OP is engaed, IC shows OP data
 - when AP is engaged, IC shows AP data
* option to ignore radar errors (useful in winter time when radar might get dirty)

v0.8.13-57 (2022-11-17)

* Fix pedal pressed message on ACC
* Adjust top speed with speed limit for AP1
* Show set speed in lower right corner for RHD cars
* Brake factor speed adjustable (1.1 below 70km/h, 1.4 above 110km/h)

v0.8.13-56 (2022-11-08)

* Sound files volume fix
* Show TACC icon on IC for AP cars when OP is available
* Display shutdown
* Engage at 0 MPH (AP cars)
* Fleet based speed (AP cars)
* Slow down in turns based on SunnyPilot 
* prevent iBooster from pressing both pedals
* Improved acceleration handling for AP1
* Add message ID for the CAN Error 
* Reduce min accel to -4.5 
* Improve follow distance
* Better and smoother pedal with 4 profiles
* Universal calibration tool for pedal interceptor
* iBooster control improvement
* Add 5 pedal profiles and 3 acceleration profiles for better long control wiht pedal
* Add alert when maximum regen is used with pedal to show braking limit 
* Prevent PCC engagement with uncalibrated pedals
* Cancel automatic lane change on blinker or wheel touch
* Toggle to ignore wrong date/time on device
* Increase steering angle limits on Panda
* Fix Controls Mismatch when taking over steering

v0.8.13-55 (2022-09-21)

* Sound toggles (to mute certain sounds)
* Sound files

v0.8.13-54 (2022-09-19)

* Add capabilities for Str params
* Implement fixed fingerprint option to avoid fingerprinting issues

v0.8.13-53 (2022-08-05)

* iBooster ECU fixes
* Try to fix Controls Mismatch issues
* Add toggle for radar error with AP

v0.8.13-52 (2022-08-05)

* Reset Pedal PID on engagement
* Toggle for Model S Performance for pedal (bug fix)
* Pedal profile for MS Performance (bug fix)
* Toggle to prevent auto updates
* Toggle for dev unit (bug fix)
* Autoresume speed from stand still

v0.8.13-51 (2022-07-05)

* new PID for pedal, including way to save state
* toggle for Model S Performance for pedal
* pedal profile for MS Performance

v0.8.13-48 (2022-05-18)

* limit iBooster travel to a max of 15mm (90psi on my car)
* set Hold values for iBooster to 6.5mm (14psi)
* change lane poly calculation logic for IC integrtion

v0.8.13-47 (2022-05-11)

  • do not send iBooster brake command when real accelerator pedal is pressed

v0.8.13-46 (2022-05-10)

  • do not send iBooster brake command when accelerator pedal is pressed
  • increase brake hold value

v0.8.13-45 (2022-05-09)

  • update firmware for Vacuum Sensor board with brake release condition
  • allow 0x553 for iBooster in panda
  • allow 0x555 for IVS in panda

v0.8.13-44 (2022-05-04)

  • update firmware for Vacuum Sensor board
  • fix CRC for iBooster

v0.8.13-43 (2022-04-21)

  • fix Pedal over CC issues when MCU2 or no Tinkla Buddy
  • add firmware for Vacuum Sensor board
  • fix CRC for iBooster

v0.8.13-41 (2022-04-19)

  • fix startup screen for C3
  • fix modem initialization for C3 (comma three: correctly set initial EPS bearer settings for AT&T sim cards)
  • fix logic for enabling OP on preAP MS
  • add C3 Tinkla Splash

v0.8.13-38 (2022-04-05)

  • toggle to allow move of maps on left
  • always show OP data on IC when engaged (AP1/AP2)
  • Comma three support
  • fix top speed indicator when using pedal with Tinkla Buddy

v0.8.13-37 (2022-04-01)

  • added configuration value for HandsOnLevel before human takeover
  • fixed acceleration for AP1 stop-and-go which was limited at 1.2m/s^2
  • added testing toggle for full LongControl from planner vs actuator (AP1 or preAP with iBooster)
  • fixed release scripts
  • fixed automatic flashing of panda code

v0.8.13-34 (2022-03-27)

  • full support for OP long control with AP1
  • follow distance is adjustable from CC stalk (when available)
  • UI shows multiple road lanes when detected by OP
  • fix bug where ACC would show disabled message after brake press even when not enabled
  • variable acceleration based on speed for AP1 OP based long control
  • improve pedal tune (by vandreykiv)
  • fix variables default value not showing correctly in UI

v0.8.13-33 (2022-03-26)

  • new events to show when Standard CC is enabled
  • added shutdown timeout for device (vandreykiv)

v0.8.13-32 (2022-03-20)

  • allows Standard CC (no LKAS) to be used with pedal when cruise enabled
  • allows Standard CC (no LKAS) to be used with ACC by double press down
  • allows for pedal to be used over CC (when setting enabled)

v0.8.13-31 (2022-03-18)

  • based on v0.8.13 (latest release from Comma)
  • requires EON Gold/Black Panda or Comma two/three
  • no need for EPAS harness
  • Panda flash built in UI
  • Pedal flash built in UI
  • EPAS patching built in UI
  • Radar VIN Learner built in UI
  • radar behind nosecone setting as part of VIN Learn (set via UI)
  • works with either human long control, ACC or pedal
  • no more ssh to install or update
  • no more ssh to change any settings, all done through UI
  • automatic change top speed based on speed limit and offset (either units or %)
  • automatic lane change with adjustable delay
  • human steering override with adjustable delay for re-engagement
  • steering never disengages unless you cancel it via stalk
  • adjustable follow distance though UI
  • allows for CC without LKAS when using Pedal
  • pedal can be on either CAN0 or CAN2 (set via UI)
  • support for iBooster ECU (in dev)