Difference between revisions of "Subaru"

From comma wiki
Jump to: navigation, search
(Status of Longitudinal control (accelerator and brakes))
Line 2: Line 2:
 
= Status =
 
= Status =
  
The Subaru OpenPilot port is still in development, we've had it working but scraped everything in favor of better steering control.
+
The Subaru OpenPilot port working for global platform (2018+) models. Pre-global models (2015-2017) support is still in development and needs tuning.
Tuning needs a lot of love.
 
  
 
== Status of Latitudinal control (steering) ==
 
== Status of Latitudinal control (steering) ==
  
Openpilot will handle steering via [https://dattechweb.com/subaru-giraffe Giraffe] (or custom wire harness) and filtered CAN forwarding
+
Openpilot handles steering using [https://comma.ai/shop/products/eon-gold-dashcam-devkit Subaru Giraffe]. Pre-global models can also use [https://dattechweb.com/subaru-giraffe Giraffe] or custom wire harness.
  
 
== Status of Longitudinal control (accelerator and brakes) ==
 
== Status of Longitudinal control (accelerator and brakes) ==
  
Eyesight will handle longitudinal control through stock ACC
+
Eyesight handles longitudinal control using stock ACC. Stop and go support - stop is automatic, go requires ACC resume button
Longitudinal support with stop and go is easily possible. However, subaru lacks a radar and eyesight is currently better than openpilot's vision mock radar.
 
  
 
= TODO =
 
= TODO =
 +
Global
 +
 
* Steering
 
* Steering
** find missing Steering Torque CAN message for XV/Global Platform (check CAN PID doc for guidance) - DONE
+
** CAN messages (DBC) - DONE
** tuning
+
** tuning - DONE
  
 
* Panda CAN forwarding - DONE
 
* Panda CAN forwarding - DONE
 
* Panda CAN filtering - DONE
 
* Panda CAN filtering - DONE
* Panda safety
+
* Panda safety - DONE
 +
 
 +
Pre-global
 +
 
 +
* Steering
 +
** CAN messages (DBC) - DONE
 +
** tuning - in progress
 +
** Panda safety - [https://github.com/commaai/panda/pull/189 PR], needs testing
  
 
= Getting started =
 
= Getting started =
Line 30: Line 37:
 
* [https://community.comma.ai/wiki/index.php/Main_Page#Panda Panda] from [https://comma.ai/shop/ comma.ai shop] - Grey Panda with high precision GNSS is recommended
 
* [https://community.comma.ai/wiki/index.php/Main_Page#Panda Panda] from [https://comma.ai/shop/ comma.ai shop] - Grey Panda with high precision GNSS is recommended
 
* [https://community.comma.ai/wiki/index.php/Main_Page#EON EON]  from [https://comma.ai/shop/ comma.ai shop] (or DIY using OnePlus 3T and cooling method)
 
* [https://community.comma.ai/wiki/index.php/Main_Page#EON EON]  from [https://comma.ai/shop/ comma.ai shop] (or DIY using OnePlus 3T and cooling method)
 +
* [https://community.comma.ai/wiki/index.php/Main_Page#Giraffe Giraffe] from [https://comma.ai/shop/ comma.ai shop]
 
* [https://community.comma.ai/wiki/index.php/Main_Page#Giraffe Giraffe] from [https://dattechweb.com/subaru-giraffe Clayson]
 
* [https://community.comma.ai/wiki/index.php/Main_Page#Giraffe Giraffe] from [https://dattechweb.com/subaru-giraffe Clayson]
 
* OR order connectors and build a [https://docs.google.com/spreadsheets/d/1HczSKwVeX7z7HNM3mSpWelJQ0mk0h4YY_AWX8RkIAHw/view R137 wiring harness] yourself.
 
* OR order connectors and build a [https://docs.google.com/spreadsheets/d/1HczSKwVeX7z7HNM3mSpWelJQ0mk0h4YY_AWX8RkIAHw/view R137 wiring harness] yourself.
Line 80: Line 88:
 
** Reverse Automatic Braking (RAB) - 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/martinl/openpilot/blob/devel/opendbc/subaru_xv_2018_eyesight.dbc DBC]
+
** [https://github.com/commaai/opendbc/blob/master/subaru_global_2017.dbc DBC]
  
 
= Subaru Eyesight =  
 
= Subaru Eyesight =  

Revision as of 19:06, 21 May 2019

Status

The Subaru OpenPilot port working for global platform (2018+) models. Pre-global models (2015-2017) support is still in development and needs tuning.

Status of Latitudinal control (steering)

Openpilot handles steering using Subaru Giraffe. Pre-global models can also use Giraffe or custom wire harness.

Status of 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

  • Steering
    • CAN messages (DBC) - DONE
    • tuning - DONE
  • Panda CAN forwarding - DONE
  • Panda CAN filtering - DONE
  • Panda safety - DONE

Pre-global

  • Steering
    • CAN messages (DBC) - DONE
    • tuning - in progress
    • Panda safety - PR, needs testing

Getting started

Check if your car is a good candidate

Required hardware

Adding support for new model

Read this and this

  • ssh into EON
  • Create Openpilot fingerprint for the car
  • Use Cabana to reverse engineer CAN messages required for Openpilot. This collection of DBC files is good place to start

Models

Legacy/Outback

  • 2015 Eyesight
    • Compatible with Panda and steering controller accepts LKAS message from 2016.
    • DBC
  • MY2016 w/ LKAS (eyesight)
    • Compatible with Panda and steering controller accepts spoofed by OpenPilot
    • ES DBC
  • 2017 w/ LKAS (eyesight)
    • Compatible with Panda and steering controller accepts spoofed by OpenPilot
    • Stock lane keep assist disabled OpenPilot runs while ACC is active
    • Exact DBC n/a

WRX

BRZ

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

Eyesight compartment

Removing Eyesight cover

Additional Info

(*) Note - Data is unverified until someone can confirm they are correct.