Difference between revisions of "Subaru"
(95 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | = Status = | |
+ | |||
+ | Supported models | ||
+ | |||
+ | {| | ||
+ | ! style="text-align:left;"| Model | ||
+ | ! Trim | ||
+ | ! Year | ||
+ | ! Region | ||
+ | |- | ||
+ | |Impreza | ||
+ | |Limited | ||
+ | |2019 | ||
+ | |US | ||
+ | |- | ||
+ | |Impreza | ||
+ | |2.0i-L | ||
+ | |2018 | ||
+ | |AU | ||
+ | |- | ||
+ | |XV | ||
+ | |Active 2.0 | ||
+ | |2018 | ||
+ | |EU | ||
+ | |- | ||
+ | |XV | ||
+ | |2.0i-S | ||
+ | |2018 | ||
+ | |AU | ||
+ | |- | ||
+ | |Outback | ||
+ | |Premium 2.5i | ||
+ | |2015 | ||
+ | |AU | ||
+ | |- | ||
+ | |Outback | ||
+ | |Premium 2.5i | ||
+ | |2015 | ||
+ | |US | ||
+ | |- | ||
+ | |Outback | ||
+ | |Premium 2.5i | ||
+ | |2018 | ||
+ | |US | ||
+ | |- | ||
+ | |Outback | ||
+ | |Premium 2.5i | ||
+ | |2016 | ||
+ | |US | ||
+ | |- | ||
+ | |Outback | ||
+ | |Premium 3.6i | ||
+ | |2015 | ||
+ | |US | ||
+ | |- | ||
+ | |Legacy | ||
+ | |2.5i | ||
+ | |2017 | ||
+ | |US | ||
+ | |- | ||
+ | |Legacy | ||
+ | | | ||
+ | |2018 | ||
+ | |US | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | Main requirements for adding Openpilot support are Eyesight and LKAS. Adding Openpilot support to models not listed means adding a new fingerprint. | ||
+ | |||
+ | == Installation == | ||
+ | |||
+ | * Global - https://www.youtube.com/watch?v=LD7qiOcPFtU | ||
+ | * Pre-global - https://www.youtube.com/watch?v=-1Snpp3cQEg | ||
+ | |||
+ | == Lateral control (steering) == | ||
+ | |||
+ | Openpilot handles steering using EON, Panda and Giraffe or custom wire harness. | ||
+ | |||
+ | == Longitudinal control (accelerator and brakes) == | ||
+ | |||
+ | Eyesight handles longitudinal control using stock ACC. Stop and go support - stop is automatic, go requires ACC resume button | ||
+ | |||
+ | = TODO = | ||
+ | Global | ||
+ | * Upstreamable hardware solution for Giraffe relay control - in progress | ||
+ | |||
+ | Pre-global | ||
+ | |||
+ | * Lateral | ||
+ | ** CAN messages (DBC) - DONE | ||
+ | ** Panda CAN forwarding - DONE | ||
+ | ** Panda CAN filtering - DONE | ||
+ | ** Panda safety - DONE | ||
+ | ** tuning - in progress | ||
+ | ** upstream pre-global PR [https://github.com/commaai/openpilot/pull/717 #717] - in progress | ||
+ | |||
+ | = Getting started = | ||
+ | |||
+ | Required hardware | ||
+ | * [https://community.comma.ai/wiki/index.php/Main_Page#EON EON] from [https://comma.ai/shop/products/eon-gold-dashcam-devkit comma.ai shop] (or DIY using OnePlus 3T and cooling method) | ||
+ | * [https://community.comma.ai/wiki/index.php/Main_Page#Panda Panda] from [https://comma.ai/shop/products/car-harness comma.ai shop] - Black Panda/Car Harness is recommended | ||
+ | |||
+ | == Adding support for new model == | ||
+ | |||
+ | Read first | ||
+ | * [https://medium.com/@comma_ai/a-panda-and-a-cabana-how-to-get-started-car-hacking-with-comma-ai-b5e46fae8646 Panda and Cabana - How to get started with car hacking] | ||
+ | * [https://medium.com/@energee/add-support-for-your-car-to-comma-ai-openpilot-3d2da8c12647 Add support for your car to Openpilot] | ||
+ | |||
+ | Check if your car fingerprint is already added to any of the forks/branches | ||
+ | * [https://github.com/bugsy924/openpilot/blob/subaru/selfdrive/car/subaru/values.py subaru] | ||
+ | * [https://github.com/martinl/openpilot/blob/subaru-giraffe-devel/selfdrive/car/subaru/values.py subaru-giraffe-devel] | ||
+ | * [https://github.com/martinl/openpilot/blob/diy-giraffe-devel/selfdrive/car/subaru/values.py diy-giraffe-devel] | ||
+ | |||
+ | Porting | ||
+ | * [https://community.comma.ai/wiki/index.php/Configuring_OpenPilot ssh] into EON | ||
+ | * move stock openpilot and set up a fork (choose according to global/pre-global and type of giraffe below) | ||
+ | ** killall tmux | ||
+ | ** mkdir /data/commaai | ||
+ | ** mv /data/openpilot /data/commaai | ||
+ | ** mkdir /data/<fork> | ||
+ | ** cd /data/<fork> | ||
+ | ** git clone https://github.com/<fork>/openpilot.git | ||
+ | ** cd openpilot | ||
+ | ** git checkout <branch> | ||
+ | ** cd /data | ||
+ | ** ln -sf /data/<fork>/openpilot . | ||
+ | ** cd /data/openpilot | ||
+ | |||
+ | * flash panda | ||
+ | ** cd /data/openpilot/panda/board | ||
+ | ** killall boardd | ||
+ | ** make | ||
+ | |||
+ | * test build and start openpilot | ||
+ | ** cd /data/openpilot | ||
+ | ** make | ||
+ | ** ./launch_openpilot.sh | ||
+ | |||
+ | * kill openpilot running from console | ||
+ | ** ssh in (second session) | ||
+ | ** killall manager.py | ||
+ | |||
+ | * when nothing checks out | ||
+ | ** restart car, reconnect panda and try again | ||
+ | |||
+ | * Create Openpilot [https://community.comma.ai/wiki/index.php/Creating_Fingerprints fingerprint] for the car | ||
+ | * For global models add fingerprint to IMPREZA as first step in selfdrive/car/subaru/values.py | ||
+ | * Use [https://community.comma.ai/wiki/index.php/Main_Page#Cabana Cabana] to reverse engineer any missing CAN messages required for Openpilot | ||
+ | ** DBC files | ||
+ | *** [https://github.com/commaai/opendbc/blob/master/subaru_global_2017.dbc Subaru Global] | ||
+ | *** [https://github.com/commaai/opendbc/blob/master/subaru_outback_2015_eyesight.dbc Subaru Outback 2015] | ||
+ | |||
+ | Openpilot forks and branches to use as base for porting | ||
+ | * Pre-Global (2015-2017) | ||
+ | ** [https://github.com/bugsy924/openpilot bugsy924] subaru - supports pre-global models and giraffe, Eyesight on CAN2 | ||
+ | |||
+ | * Global (2018+) | ||
+ | ** [https://github.com/martinl/openpilot martinl] subaru-giraffe-devel - supports comma giraffe with relay, Eyesight on CAN2 | ||
+ | ** [https://github.com/martinl/openpilot martinl] diy-giraffe-devel - supports DIY giraffe, Eyesight on CAN2 | ||
− | + | = Models = | |
− | |||
− | |||
− | |||
− | |||
+ | == Legacy/Outback == | ||
+ | * 2015 Eyesight | ||
+ | ** Compatible with Panda and steering controller accepts LKAS message from 2016 | ||
+ | ** [https://github.com/bugsy924/openpilot/blob/devel/opendbc/subaru_outback_2015_eyesight.dbc DBC] | ||
− | + | * MY2016 Eyesight | |
− | * | + | ** Compatible with Panda and steering controller accepts LKAS message sent by OpenPilot |
− | * | + | ** [https://github.com/palmerit/opendbc/blob/master/subaru_outback_2016_eyesight.dbc ES DBC] |
− | * | ||
− | * | ||
− | * | ||
+ | * 2017 Eyesight | ||
+ | ** Compatible with Panda and steering controller accepts LKAS message sent by OpenPilot | ||
+ | ** Stock lane keep assist disabled OpenPilot runs while ACC is active | ||
+ | ** [https://github.com/bugsy924/openpilot/blob/devel/opendbc/subaru_outback_2015_eyesight.dbc Outback 2015 DBC] | ||
− | + | == WRX == | |
− | * | + | * MY2017 |
+ | ** [https://github.com/Pat93/opendbc/blob/master/Subaru_WRX_2017_Manual_NoEyesight.dbc NoES DBC] | ||
− | + | == BRZ == | |
+ | * MY2014 | ||
+ | ** [https://github.com/nsamala/opendbc/blob/master/subaru_brz_2014.dbc DBC] | ||
− | + | == XV/Crosstrek == | |
− | == XV Crosstrek == | ||
* 2013 | * 2013 | ||
− | |||
** Adaptive Cruise Control (ACC) - Not available on tested model | ** Adaptive Cruise Control (ACC) - Not available on tested model | ||
** Automatic Braking - Not available on tested model | ** Automatic Braking - Not available on tested model | ||
Line 38: | Line 192: | ||
** Lane Keep Assist System (LKAS/LKA) - Not available on tested model | ** Lane Keep Assist System (LKAS/LKA) - Not available on tested model | ||
* 2018 | * 2018 | ||
− | ** Panda | + | ** Panda wireless works with [[Chffr]] via OBD2. OBD2 connector CAN messages are filtered by CAN gateway (Body Integrated Unit - BIU). Getting unfiltered CAN messages requires [[Subaru#Main CAN bus wiring harness|CAN bus wiring harness]]. |
** Adaptive Cruise Control (ACC) - yes | ** Adaptive Cruise Control (ACC) - yes | ||
** Automatic Braking - yes | ** Automatic Braking - yes | ||
** Auto Parking Features - Not available on tested model | ** Auto Parking Features - Not available on tested model | ||
− | ** Blind Spot Detection - Not available on tested model (optional extra) | + | ** Blind Spot Detection (BSD) - Not available on tested model (optional extra) |
+ | ** Reverse Automatic Braking (RAB) - Not available on tested model (optional extra) | ||
** Lane Keep Assist System (LKAS/LKA) - yes | ** Lane Keep Assist System (LKAS/LKA) - yes | ||
+ | ** [https://github.com/commaai/opendbc/blob/master/subaru_global_2017.dbc DBC] | ||
+ | |||
+ | = Subaru Eyesight = | ||
+ | |||
+ | == Development timeline == | ||
+ | * 1989 - development started | ||
+ | * 1999 - Active Driving Assist (ADA) - worlds first | ||
+ | * 2003 - New ADA (sensor fusion, stereo cameras + radar) | ||
+ | * 2006 - SI-cruise Control by laser radar | ||
+ | * 2008 - EyeSight (stereo cameras only) | ||
+ | * 2010 - EyeSight ver 2 | ||
+ | * 2014 - EyeSight ver 3 | ||
+ | |||
+ | Source: [https://www.subaru.co.jp/en/ir/library/pdf/fact/2017/fact_all.pdf Subaru Factbook 2017] | ||
+ | Eyesight development [https://photos.app.goo.gl/A2Gm1gjeprAfAKzw6 timeline] | ||
+ | |||
+ | == Overview == | ||
+ | |||
+ | Subaru eyesight was first available in the following years/models and includes the following features: | ||
+ | * Pre-Collision Warning, Braking, and Throttle Management (Throttle lift-off during emergency braking) | ||
+ | * Lane Departure Warning | ||
+ | * Adaptive Cruise Control | ||
+ | * Dual cameras instead of radar | ||
+ | |||
+ | ''Gen1 of Eyesight only featured 'notification' systems to alert the driver of lane departure/braking events; Gen2 allows emergency braking at any time. Gen3 includes color cameras, LKAS(2016+) after lane departure and ACC restart after full stops.'' | ||
+ | |||
+ | Gen2 - 2014 Forester Touring, Legacy | ||
+ | * Pre-Collision Warning, Braking, and Throttle Management (Throttle lift-off during emergency braking) | ||
+ | * LDW | ||
+ | * ACC | ||
+ | * Stereoscopic cameras | ||
− | + | Gen3 (CVT) - 2015 Legacy, Outback, Crosstrek | |
− | + | * ACC - Adaptive cruise control | |
− | + | * Constant speed cruise control | |
− | + | * Pre-collision braking | |
+ | * AT rapid start prevention control | ||
+ | * Lane departure warning | ||
+ | * Sway warning | ||
+ | * Preceding vehicle start monitoring function | ||
− | |||
− | |||
− | + | Gen3 - 2016+ Legacy, Outback, Impreza, | |
+ | * LKAS - Active lane keep (lane departure prevention) | ||
+ | * ACC - Adaptive cruise control | ||
+ | * Constant speed cruise control | ||
+ | * Pre-collision braking | ||
+ | * AT rapid start prevention control | ||
+ | * Lane departure warning | ||
+ | * Sway warning | ||
+ | * Preceding vehicle start monitoring function | ||
− | + | Optional extras: | |
− | Here are two possible options for directly connecting to CAN bus: | + | * BSD - blind spot detection (2 radars with 75 degree FOV in rear corners) |
+ | ** LCA - lane change assistance | ||
+ | ** RCTA - reversing assistance | ||
+ | * RAB (reverse assisted braking, 4 sonar sensors in rear bumper) | ||
+ | |||
+ | More information can be found [http://www.subaru.com/engineering/eyesight.html here] | ||
+ | |||
+ | = Main CAN bus wiring harness = | ||
+ | CAN messages are filtered by CAN gateway (Body Integrated Unit) on the global platform and MY18+ cars. Getting unfiltered CAN messages requires direct connection to main CAN bus. Here are two possible options for directly connecting to CAN bus: | ||
== A-pillar == | == A-pillar == | ||
− | + | * MY2015+ | |
− | * [https://www.youtube.com/watch?v=qt-hhesUlSI Remove A-pillar cover on passenger (right) side] | + | ** [https://www.youtube.com/watch?v=qt-hhesUlSI Remove A-pillar cover on passenger (right) side] |
− | * [https://docs.google.com/spreadsheets/d/1HczSKwVeX7z7HNM3mSpWelJQ0mk0h4YY_AWX8RkIAHw/view R96/i19 connector pinout] | + | ** [https://docs.google.com/spreadsheets/d/1HczSKwVeX7z7HNM3mSpWelJQ0mk0h4YY_AWX8RkIAHw/view R96/i19 connector pinout] - currently there are no sources for ordering the R96/i19 connectors |
== Eyesight compartment == | == Eyesight compartment == | ||
Removing Eyesight cover | Removing Eyesight cover | ||
− | * Steps 1-5 | + | * Steps 1-5 (For Outback/Legacy, all others are the same process but there are 2 bolts under the lane departure off and forward collision off plate.) |
* http://subaruonlineparts.com/docs/H501SAL000.pdf | * http://subaruonlineparts.com/docs/H501SAL000.pdf | ||
− | * [https://docs.google.com/spreadsheets/d/1HczSKwVeX7z7HNM3mSpWelJQ0mk0h4YY_AWX8RkIAHw/ | + | * [https://docs.google.com/spreadsheets/d/1HczSKwVeX7z7HNM3mSpWelJQ0mk0h4YY_AWX8RkIAHw/edit?usp=sharing R137 connector pinout] and BOM for building wiring harness |
= Additional Info = | = Additional Info = | ||
− | * [https://docs.google.com/spreadsheets/d/1w8ywaBBtRebH6e4ohcqpDv52gl3RadxKqjbVYO5kdfc/view Subaru | + | * [https://docs.google.com/spreadsheets/d/1w8ywaBBtRebH6e4ohcqpDv52gl3RadxKqjbVYO5kdfc/view Subaru 2014+ CAN PID mapping overview table] |
− | + | * [https://techinfo.subaru.com/stis/#/login STIS - Official information and service manuals (requires subscription)] | |
− | * [https://techinfo.subaru.com/stis/#/login Official information and service manuals (requires subscription)] | + | * [https://subdiesel.wordpress.com/ecu-analysis/can-messages/ Subaru Impreza MY2009/2010 CAN Messages] |
− | * [https://subdiesel.wordpress.com/ecu-analysis/can-messages/ Subaru | ||
(*) Note - Data is unverified until someone can confirm they are correct. | (*) Note - Data is unverified until someone can confirm they are correct. | ||
[[Category:Vehicle_Makes]] | [[Category:Vehicle_Makes]] |
Latest revision as of 03:34, 12 November 2019
Contents
Status
Supported models
Model | Trim | Year | Region |
---|---|---|---|
Impreza | Limited | 2019 | US |
Impreza | 2.0i-L | 2018 | AU |
XV | Active 2.0 | 2018 | EU |
XV | 2.0i-S | 2018 | AU |
Outback | Premium 2.5i | 2015 | AU |
Outback | Premium 2.5i | 2015 | US |
Outback | Premium 2.5i | 2018 | US |
Outback | Premium 2.5i | 2016 | US |
Outback | Premium 3.6i | 2015 | US |
Legacy | 2.5i | 2017 | US |
Legacy | 2018 | US |
Main requirements for adding Openpilot support are Eyesight and LKAS. Adding Openpilot support to models not listed means adding a new fingerprint.
Installation
- Global - https://www.youtube.com/watch?v=LD7qiOcPFtU
- Pre-global - https://www.youtube.com/watch?v=-1Snpp3cQEg
Lateral control (steering)
Openpilot handles steering using EON, Panda and Giraffe or custom wire harness.
Longitudinal control (accelerator and brakes)
Eyesight handles longitudinal control using stock ACC. Stop and go support - stop is automatic, go requires ACC resume button
TODO
Global
- Upstreamable hardware solution for Giraffe relay control - in progress
Pre-global
- Lateral
- CAN messages (DBC) - DONE
- Panda CAN forwarding - DONE
- Panda CAN filtering - DONE
- Panda safety - DONE
- tuning - in progress
- upstream pre-global PR #717 - in progress
Getting started
Required hardware
- EON from comma.ai shop (or DIY using OnePlus 3T and cooling method)
- Panda from comma.ai shop - Black Panda/Car Harness is recommended
Adding support for new model
Read first
Check if your car fingerprint is already added to any of the forks/branches
Porting
- ssh into EON
- move stock openpilot and set up a fork (choose according to global/pre-global and type of giraffe below)
- killall tmux
- mkdir /data/commaai
- mv /data/openpilot /data/commaai
- mkdir /data/<fork>
- cd /data/<fork>
- git clone https://github.com/<fork>/openpilot.git
- cd openpilot
- git checkout <branch>
- cd /data
- ln -sf /data/<fork>/openpilot .
- cd /data/openpilot
- flash panda
- cd /data/openpilot/panda/board
- killall boardd
- make
- test build and start openpilot
- cd /data/openpilot
- make
- ./launch_openpilot.sh
- kill openpilot running from console
- ssh in (second session)
- killall manager.py
- when nothing checks out
- restart car, reconnect panda and try again
- Create Openpilot fingerprint for the car
- For global models add fingerprint to IMPREZA as first step in selfdrive/car/subaru/values.py
- Use Cabana to reverse engineer any missing CAN messages required for Openpilot
- DBC files
Openpilot forks and branches to use as base for porting
- Pre-Global (2015-2017)
- bugsy924 subaru - supports pre-global models and giraffe, Eyesight on CAN2
- Global (2018+)
Models
Legacy/Outback
- 2015 Eyesight
- Compatible with Panda and steering controller accepts LKAS message from 2016
- DBC
- MY2016 Eyesight
- Compatible with Panda and steering controller accepts LKAS message sent by OpenPilot
- ES DBC
- 2017 Eyesight
- Compatible with Panda and steering controller accepts LKAS message sent by OpenPilot
- Stock lane keep assist disabled OpenPilot runs while ACC is active
- Outback 2015 DBC
WRX
- MY2017
BRZ
- MY2014
XV/Crosstrek
- 2013
- Adaptive Cruise Control (ACC) - Not available on tested model
- Automatic Braking - Not available on tested model
- Auto Parking Features - Not available on tested model
- Blind Spot Detection - Not available on tested model
- Lane Keep Assist System (LKAS/LKA) - Not available on tested model
- 2018
- Panda wireless works with Chffr via OBD2. OBD2 connector CAN messages are filtered by CAN gateway (Body Integrated Unit - BIU). Getting unfiltered CAN messages requires CAN bus wiring harness.
- Adaptive Cruise Control (ACC) - yes
- Automatic Braking - yes
- Auto Parking Features - Not available on tested model
- Blind Spot Detection (BSD) - Not available on tested model (optional extra)
- Reverse Automatic Braking (RAB) - Not available on tested model (optional extra)
- Lane Keep Assist System (LKAS/LKA) - yes
- DBC
Subaru Eyesight
Development timeline
- 1989 - development started
- 1999 - Active Driving Assist (ADA) - worlds first
- 2003 - New ADA (sensor fusion, stereo cameras + radar)
- 2006 - SI-cruise Control by laser radar
- 2008 - EyeSight (stereo cameras only)
- 2010 - EyeSight ver 2
- 2014 - EyeSight ver 3
Source: Subaru Factbook 2017 Eyesight development timeline
Overview
Subaru eyesight was first available in the following years/models and includes the following features:
- Pre-Collision Warning, Braking, and Throttle Management (Throttle lift-off during emergency braking)
- Lane Departure Warning
- Adaptive Cruise Control
- Dual cameras instead of radar
Gen1 of Eyesight only featured 'notification' systems to alert the driver of lane departure/braking events; Gen2 allows emergency braking at any time. Gen3 includes color cameras, LKAS(2016+) after lane departure and ACC restart after full stops.
Gen2 - 2014 Forester Touring, Legacy
- Pre-Collision Warning, Braking, and Throttle Management (Throttle lift-off during emergency braking)
- LDW
- ACC
- Stereoscopic cameras
Gen3 (CVT) - 2015 Legacy, Outback, Crosstrek
- ACC - Adaptive cruise control
- Constant speed cruise control
- Pre-collision braking
- AT rapid start prevention control
- Lane departure warning
- Sway warning
- Preceding vehicle start monitoring function
Gen3 - 2016+ Legacy, Outback, Impreza,
- LKAS - Active lane keep (lane departure prevention)
- ACC - Adaptive cruise control
- Constant speed cruise control
- Pre-collision braking
- AT rapid start prevention control
- Lane departure warning
- Sway warning
- Preceding vehicle start monitoring function
Optional extras:
- BSD - blind spot detection (2 radars with 75 degree FOV in rear corners)
- LCA - lane change assistance
- RCTA - reversing assistance
- RAB (reverse assisted braking, 4 sonar sensors in rear bumper)
More information can be found here
Main CAN bus wiring harness
CAN messages are filtered by CAN gateway (Body Integrated Unit) on the global platform and MY18+ cars. Getting unfiltered CAN messages requires direct connection to main CAN bus. Here are two possible options for directly connecting to CAN bus:
A-pillar
- MY2015+
- Remove A-pillar cover on passenger (right) side
- R96/i19 connector pinout - currently there are no sources for ordering the R96/i19 connectors
Eyesight compartment
Removing Eyesight cover
- Steps 1-5 (For Outback/Legacy, all others are the same process but there are 2 bolts under the lane departure off and forward collision off plate.)
- http://subaruonlineparts.com/docs/H501SAL000.pdf
- R137 connector pinout and BOM for building wiring harness
Additional Info
- Subaru 2014+ CAN PID mapping overview table
- STIS - Official information and service manuals (requires subscription)
- Subaru Impreza MY2009/2010 CAN Messages
(*) Note - Data is unverified until someone can confirm they are correct.