Andrew Frahn 4d2ff103d6 Clean Up hyundai (#481)
* Update fingerprints.py

Taiwanese Prius Prime fingerprint was identical to the regular prime (107 msgs.), but should really have 110.  I have the correct one in there now.

* openpilot 0.4.3.1 (#220)

* Honda Pilot 2017 Port (#161)

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update interface.py

* Update interface.py

* Update README.md

* Update README.md

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update carstate.py

* Update hondacan.py

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update carstate.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update carstate.py

* Update carstate.py

* Update Pilot Fingerprint

* Update fingerprints.py

* Give pilot its own definition and not use ILX

* add pilot argument

* Add Pilot interface

* Add pilot argument

* Update interface.py

* Parse Different gear on pilot

* Add steer max

* Fixed duplication of steer max value

* Adjust PID's for steering

* Update carcontroller.py

* Change Steer Ratio and wheelbase

* Update Steer fault values

Steer fault value of 3, does not seem to effect anything

* Update Kp,Ki Ratio

* Update interface.py

* Update readme for Pilot

* add pilot

* Update fingerprints.py

* Update carstate.py

* add signals

* add signal

* fix restricting video upload to wifi

* Dibs on SAFETY_GM numerical value

To match Panda repo.

* Safety Reference for Honda Bosch

* Update fingerprints.py (#210)

Consolidated my fingerprint and removed duplicates and ordered the fingerprint for the RAV4H. Double Checked.

* Interpolate ki/kp for steering PID loop (#200)

* Interpolate ki/kp for steering PID loop

Very much needed for the Volt port: car ping-pongs with low kp
on high speeeds, and the loop is unstable with high kp on
low speeds.

Also, removes "number or array?" logic from PIController,
now that all the callers use interpolation ofr ki/kp.

* Pass speed to steering PID loop for ki/kp interpolation

* Remove unused numbers import

* Slight changes to UI and Fingerprint for Odyssey Elite (#196)

* Adding back drive time to UI

* Add fingerprint for Odyssey Elite

* Removed extended fingerprint for Elite

* Revert "Adding back drive time to UI"

This reverts commit b9b02f7ff2511f28922f0bea47cd8c70bb9f4010.

* Squashed 'panda/' changes from 98f29a4..67d5208

67d5208 fix signedness issue in toyota safety
fe15d3f bump pandacan
11c2b08 add fault invalid
2c26e45 add sleep
27c7637 forgot the counter
3a6d7db don't hang
bfa7d2e canloader works
b259e2a can flasher is close to working
83f2edf isotp can support in softloader
7ae7c79 typo
e85cc47 forgot the selfs
190b4f6 start work on canflasher
5c655c9 add recover support
ae3457f usbflash is reliable
f7a0ab0 pedal usbflash works
585d0f9 add way to call isotp
be82899 despite it being bad code, move isotp
000715b start work on pedal canloader
626e312 pedal has a bootstub now
3662d1e redundant check
81e6b0d fix bug
083cd12 should have bounty to refactor that ish
b65d30c bad asserts
b2e6c3f isotp untested support for subaddr
30fd66a Merge pull request #93 from vntarasov/volt
06f5109 Merge pull request #94 from gregjhogan/can-printer-hex
c7d098c Merge pull request #95 from gregjhogan/setup-script
22fe250 Merge pull request #99 from gregjhogan/bit-transition-example
ba16ba3 Merge pull request #100 from gregjhogan/j2534-troubleshooting-instructions
ad08ea4 Merge pull request #90 from gregjhogan/can-forwarding
f3b6f5d added j2534 troubleshooting instructions
858d150 added script to find bits that transition from 0 to 1
c6acac8 added checking pedal interceptor message length
f7226ff added brake safety checks
d0c2634 added gas safety checks
d378e4a removed bosch safety forwarding restriction on 29 bit addresses
5c7ef9e added bosch safety hooks and forwarding
90c64b6 add note
23de8d4 Merge pull request #97 from commaai/pedal_improvements
0261641 added missing python packages
b92b235 fix bytearray encode issue
2434f1c Tweak Volt's brake pedal stickiness
e2f73d2 enable has a whole byte to itself
d5a9e1e correct checksum
f8ed9fa better names
986a14c don't alias pointers
9b8472e add watchdog support
8f0add9 handle faults
1d917f8 split gas set into 2 values, and have a fault state
1b77026 j2534 isn't alpha anymore
fbcc872 Merge pull request #92 from commaai/pedal
8a6f44b pedal is sending messages
08f464c python 3 bro is bad bro
9390961 kline checksum algo was broken...
3b7c33b add kline debug support
aa622bc init values
631ea9f better refactor
eb1fd75 add PEDAL adc sets
ccaa310 don't build with usb
8d4d763 debug console works
bd09883 comma pedal is building
75a29d5 Merge pull request #84 from gregjhogan/j2534-hds
eece37d only the panda has gmlan
9f43abe Merge pull request #89 from vntarasov/volt
5364d43 Merge pull request #88 from vntarasov/smaller-firmware
377a1ec bump version for descriptor fix
4fabdf0 Merge pull request #87 from gregjhogan/usb-multi-packet-control
8580773 fix sending WinUSB Extended Properties Feature Descriptor
6908feb Chevy Volt safety
786a004 Enable optimization to reduce firmware size
d70f43b hack to fix thinkpad
95ab1ae fixed flow control message padding
bbd04d1 updated installer
62216d0 single standalone DLL for J2534 driver
5c9138d fixed 11 bit address issue
f3b0ad2 fix LOOPBACK getting set when DATA_RATE is set
b750d36 updated README
a9a097f lowered CPU utilization
7c26a70 TIS needs unsupported protocols to return an error
42692b4 TIS doesn't like ChannelID being zero
cf126bb SET_CONFIG return error for reserved parameters
2e99dbf fix HDS issues
8203cc8 add is_grey
e946a54 add insecure_okay flag
4363b3e check webpage
4f59ded add secure mode note
6b11fb5 add autosecuring to tests
b27d185 Merge pull request #86 from commaai/better_pairing
4b53b42 elm wifi isn't an automated test
99f85cb Merge pull request #85 from gregjhogan/usb-wcid
0d38060 auto-install WinUSB device driver
c6653ca from python import
38cc0ee add wifi_secure_mode, boots in insecure mode

git-subtree-dir: panda
git-subtree-split: 67d52089a1300b86800d897f2b271e0a24cf6dd6

* Squashed 'opendbc/' changes from 81d9871..aa067f7

aa067f7 Chevy Volt tweaks (#83)
a60c6c4 Toyota: change signal name in EPS_STATUS msg
ce70b1a extra setme field toyota LKAS_HUD
df2a552 toyota missing ACC_CONTROL checksum
48bb293 Revert "Toyota Prius: added a comma specific message to control the speed sent to the EPS"
5f42439 Toyota Prius: added a comma specific message to control the speed sent to the EPS
6f5e8b6 Pedal Interceptor: fault state VAL moved to _comma
efd5f5c add setme to honda ACC_HUD
97fc335 add interceptor to civic
6f40f16 update generator script to allow for multiple imports
9ca956b add setme to toyota STEERING_IPAS
e5afa57 run generator for ipas scaling
8bd1182 Toyota IPAS: proper steer angle unit
f57511e acceleration pedal for gasPressed
c8d1dbc high beams also. likely dashboard message.
9f1c78b high beams for genericToggle
f037d42 turn signal lights (and thus hazard lights)
b35bb08 turn signals
78986cf Revert "turn signals"
ba946c9 turn signals
2af3ecc Speed, braking, and distance signals
f40ab87 Set packet lengths, adding steering rate, adjusted speed
cd59bfa units for speed_right
c2fcce2 speed of right vs left side of car
4ef5fae value table for gear status
97c48e2 tighten up speed bits. brake pressue max comment.
a0cbfd1 add gear status PRNDL
0c82865 initial signals for chrysler pacifica 2017 hybrid
5ed0540 add set me to toyota LKAS_HUD
aecac5d add set me fields to toyota ACC_HUD
5417013 update toyota ACC_CONTROL fields
e91e967 Comma Pedal: made GAS_COMMAND 6 bytes
d04434a Comma Pedal: added state byte and enable bit
c30b2cd Comma Pedal: sending 2 tracks on 0x200
8f72467 Volt doors and belts status (#70)
60f8b6c add set me to lkas hud honda
3c9e335 fix honda pcm gas message size
7ca471d Add 2018 Toyota CHR dbc (#78)
637fe00 set scaling to 1 for brake and gas which have no real unit
62a88d4 Volt: switch to parsing ACC buttons from powertrain CAN (#74)
3fdd47b Volt's gas pedal only and combined gas/acc (#76)
45ec9c9 Add 2017 Honda Ridgeline (#77)
cbd186a Add 2018 Camry Hybrid DBC's (#73)
974eeaf Toyota: re-generated the files after cfbc9ae363f98ef
19ea195 Toyota: more vals for LKA_STATE
cfbc9ae fixed inconsistent factor for speed in Honda dbc files
e7db803 convert all line endings to unix style

git-subtree-dir: opendbc
git-subtree-split: aa067f7079aa12617f7a37d85233e51af44e1bb2

* openpilot v0.4.3 release

* Squashed 'panda/' changes from 67d5208..3125232

3125232 bump version
703c0b4 Gas Interceptor: another fix to gas pressed logic
196d383 Interceptor: fixed gas pressed logic

git-subtree-dir: panda
git-subtree-split: 31252324d98e701c33cb6aeda20af6b549175764

* Squashed 'opendbc/' changes from aa067f7..91e882d

91e882d Updating bosch dbcs to use new format and bringing in new honda changes (#82)
9b32e2e Fix Checksum errors for CH-R (#86)

git-subtree-dir: opendbc
git-subtree-split: 91e882d4a04c129e12d39bcff0bbe56b75166e0f

* openpilot v0.4.3 release

* openpilot v0.4.3.1 release

* fix bug in canpacker for Toyotas with DSU connected (#221)

* update year on civic

* Revert "openpilot 0.4.3.1 (#220)"

This reverts commit 640ab12c72719aeadc0d4045a7f022d5bbdc7a1a.

* Revert the changes to GM in 0.5.4 (#380) (#386)

* Revert 0.5.4 changes for GM for 18ers

* Redo the refactor of stock control msgs

* Fixed missing CONTROL_MSGS -> STOCK_CONTROL_MSGS

* Remove spacing

* Need candidate array idx

* Cleanup

Uses generic dbc
All car names in alphabetical order
All fingerprints in alphabetical order
Acknowledgement to users who have made each vehicle possible

* no unecessary comments

* Match dbc to opendbc
2018-12-26 21:43:04 -08:00
2018-12-10 14:13:12 -08:00
2018-12-10 14:13:12 -08:00
2018-12-10 14:13:12 -08:00
2018-12-26 21:43:04 -08:00
2018-12-10 14:13:12 -08:00
2018-12-10 14:06:10 -08:00
2018-12-26 21:43:04 -08:00
2018-08-19 20:36:37 -07:00
2017-09-30 19:05:03 -07:00
2018-08-19 20:36:37 -07:00
2018-09-25 00:13:41 -07:00
2018-06-25 13:48:52 -07:00
2018-03-17 00:01:50 -07:00
2018-03-17 00:01:50 -07:00
2017-10-31 02:27:39 -07:00
2018-03-17 00:01:50 -07:00
2018-12-10 14:13:12 -08:00
2017-09-30 19:05:03 -07:00
2018-08-02 02:58:52 +00:00

Welcome to openpilot

openpilot is an open source driving agent. Currently, it performs the functions of Adaptive Cruise Control (ACC) and Lane Keeping Assist System (LKAS) for selected Honda, Toyota, Acura, Lexus, Chevrolet, Hyundai, Kia. It's about on par with Tesla Autopilot and GM Super Cruise, and better than all other manufacturers.

The openpilot codebase has been written to be concise and to enable rapid prototyping. We look forward to your contributions - improving real vehicle automation has never been easier.

Table of Contents


Community

openpilot is developed by comma.ai and users like you.

We have a Twitter you should follow.

Also, we have a several thousand people community on slack.

Hardware

At the moment openpilot supports the EON Dashcam DevKit. A panda and a giraffe are recommended tools to interface the EON with the car. We'd like to support other platforms as well.

Install openpilot on a neo device by entering https://openpilot.comma.ai during NEOS setup.

Supported Cars

Make Model Supported Package Lateral Longitudinal No Accel Below No Steer Below Giraffe
Acura ILX 2016-17 AcuraWatch Plus Yes Yes 25mph1 25mph Nidec
Acura RDX 2018 AcuraWatch Plus Yes Yes 25mph1 12mph Nidec
Chevrolet3 Malibu 2017 Adaptive Cruise Yes Yes 0mph 7mph Custom7
Chevrolet3 Volt 2017-18 Adaptive Cruise Yes Yes 0mph 7mph Custom7
Cadillac3 ATS 2018 Adaptive Cruise Yes Yes 0mph 7mph Custom7
GMC3 Acadia Denali 2018 Adaptive Cruise Yes Yes 0mph 7mph Custom7
Holden3 Astra 2017 Adaptive Cruise Yes Yes 0mph 7mph Custom7
Honda Accord 2018 All Yes Stock 0mph 3mph Bosch
Honda Civic Sedan/Coupe 2016-18 Honda Sensing Yes Yes 0mph 12mph Nidec
Honda Civic Hatchback 2017-18 Honda Sensing Yes Stock 0mph 12mph Bosch
Honda CR-V 2015-16 Touring Yes Yes 25mph1 12mph Nidec
Honda CR-V 2017-18 Honda Sensing Yes Stock 0mph 12mph Bosch
Honda Odyssey 2017-19 Honda Sensing Yes Yes 25mph1 0mph Inverted Nidec
Honda Pilot 2016-18 Honda Sensing Yes Yes 25mph1 12mph Nidec
Honda Pilot 2019 All Yes Yes 25mph1 12mph Inverted Nidec
Honda Ridgeline 2017-19 Honda Sensing Yes Yes 25mph1 12mph Nidec
Hyundai Santa Fe 2019 All Yes Stock 0mph 0mph Custom6
Hyundai Elantra 2017 SCC + LKAS Yes Stock 19mph 34mph Custom6
Hyundai Genesis 2018 All Yes Stock 19mph 34mph Custom6
Kia Sorento 2018 All Yes Stock 0mph 0mph Custom6
Kia Stinger 2018 SCC + LKAS Yes Stock 0mph 0mph Custom6
Lexus RX Hybrid 2016-18 All Yes Yes2 0mph 0mph Toyota
Toyota Camry 20184 All Yes Stock 0mph5 0mph Toyota
Toyota C-HR 2017-184 All Yes Stock 0mph 0mph Toyota
Toyota Corolla 2017-18 All Yes Yes2 20mph 0mph Toyota
Toyota Highlander 2017-18 All Yes Yes2 0mph 0mph Toyota
Toyota Highlander Hybrid 2018 All Yes Yes2 0mph 0mph Toyota
Toyota Prius 2016 TSS-P Yes Yes2 0mph 0mph Toyota
Toyota Prius 2017-18 All Yes Yes2 0mph 0mph Toyota
Toyota Prius Prime 2017-18 All Yes Yes2 0mph 0mph Toyota
Toyota Rav4 2016 TSS-P Yes Yes2 20mph 0mph Toyota
Toyota Rav4 2017-18 All Yes Yes2 20mph 0mph Toyota
Toyota Rav4 Hybrid 2017-18 All Yes Yes2 0mph 0mph Toyota

1Comma Pedal is used to provide stop-and-go capability to some of the openpilot-supported cars that don't currently support stop-and-go. Here is how to build a Comma Pedal. NOTE: The Comma Pedal is not officially supported by comma.ai
2When disconnecting the Driver Support Unit (DSU), otherwise longitudinal control is stock ACC. For DSU locations, see Toyota Wiki page
3GM installation guide.
4It needs an extra 120Ohm resistor (pic1, pic2) on bus 3 and giraffe switches set to 01X1 (11X1 for stock LKAS), where X depends on if you have the comma power.
528mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control.
6Open sourced Hyundai Giraffe is designed ofor the 2019 Sante Fe; pinout may differ for other Hyundais.
7Community built Giraffe, find more information here, GM Giraffe.

Community Maintained Cars

Make Model Supported Package Lateral Longitudinal No Accel Below No Steer Below Giraffe
Honda Fit 2018 Honda Sensing Yes Yes 25mph1 12mph Inverted Nidec
Tesla Model S 2012 All Yes Not yet Not applicable 0mph Custom8
Tesla Model S 2013 All Yes Not yet Not applicable 0mph Custom8

[Honda Fit Pull Request].
[Tesla Model S Pull Request]
8Community built Giraffe, find more information here Community Tesla Giraffe

Community Maintained Cars are not confirmed by comma.ai to meet our safety model. Be extra cautious using them.

In Progress Cars

  • All TSS-P Toyota with Steering Assist.
    • 'Full Speed Range Dynamic Radar Cruise Control' is required to enable stop-and-go. Only the Prius, Camry and C-HR have this option.
    • Even though the Tundra, Sequoia and the Land Cruiser have TSS-P, they don't have Steering Assist and are not supported.
    • Only remaining Toyota cars with no port yet are the Avalon and the Sienna.
  • All LSS-P Lexus with Steering Assist or Lane Keep Assist.
    • 'All-Speed Range Dynamic Radar Cruise Control' is required to enable stop-and-go. Only the GS, GSH, F, RX, RXH, LX, NX, NXH, LC, LCH, LS, LSH have this option.
    • Even though the LX have TSS-P, it does not have Steering Assist and is not supported.
  • All Hyundai with SmartSense.
  • All Kia with SCC and LKAS.

How can I add support for my car?

If your car has adaptive cruise control and lane keep assist, you are in luck. Using a panda and cabana, you can understand how to make your car drive by wire.

We've written guides for Brand and Model ports. These guides might help you after you have the basics figured out.

  • BMW, Audi, Volvo, and Mercedes all use FlexRay and are unlikely to be supported any time soon.
  • We put time into a Ford port, but the steering has a 10 second cutout limitation that makes it unusable.
  • The 2016-2017 Honda Accord uses a custom signaling protocol for steering that's unlikely to ever be upstreamed.

Directory structure

.
├── apk                 # The apk files used for the UI
├── cereal              # The messaging spec used for all logs on EON
├── common              # Library like functionality we've developed here
├── installer/updater   # Manages auto-updates of openpilot
├── opendbc             # Files showing how to interpret data from cars
├── panda               # Code used to communicate on CAN and LIN
├── phonelibs           # Libraries used on EON
├── pyextra             # Libraries used on EON
└── selfdrive           # Code needed to drive the car
    ├── assets          # Fonts and images for UI
    ├── boardd          # Daemon to talk to the board
    ├── can             # Helpers for parsing CAN messages
    ├── car             # Car specific code to read states and control actuators
    ├── common          # Shared C/C++ code for the daemons
    ├── controls        # Perception, planning and controls
    ├── debug           # Tools to help you debug and do car ports
    ├── locationd       # Soon to be home of precise location
    ├── logcatd         # Android logcat as a service
    ├── loggerd         # Logger and uploader of car data
    ├── proclogd        # Logs information from proc
    ├── sensord         # IMU / GPS interface code
    ├── test            # Car simulator running code through virtual maneuvers
    ├── ui              # The UI
    └── visiond         # Embedded vision pipeline

To understand how the services interact, see selfdrive/service_list.yaml

User Data / chffr Account / Crash Reporting

By default, openpilot creates an account and includes a client for chffr, our dashcam app. We use your data to train better models and improve openpilot for everyone.

It's open source software, so you are free to disable it if you wish.

It logs the road facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs. The user facing camera is only logged if you explicitly opt-in in settings. It does not log the microphone.

By using it, you agree to our privacy policy. You understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma.ai. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma.ai for the use of this data.

Testing on PC

There is rudimentary infrastructure to run a basic simulation and generate a report of openpilot's behavior in different scenarios.

# Requires working docker
./run_docker_tests.sh

The resulting plots are displayed in selfdrive/test/tests/plant/out/longitudinal/index.html

More extensive testing infrastructure and simulation environments are coming soon.

Contributing

We welcome both pull requests and issues on github. Bug fixes and new car ports encouraged.

Want to get paid to work on openpilot? comma.ai is hiring

Licensing

openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.

Any user of this software shall indemnify and hold harmless Comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys fees and costs) which arise out of, relate to or result from any use of this software by user.

THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT. YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS. NO WARRANTY EXPRESSED OR IMPLIED.


Languages
Python 67.3%
C++ 26.7%
Cap'n Proto 1.7%
C 1.4%
Shell 1.4%
Other 1.5%