Subaru

From comma wiki
Revision as of 13:20, 21 January 2020 by Mlp (talk | contribs) (Known issues)

Jump to: navigation, search

Status

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

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

Community supported models

Model Trim Year Region
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 and may require some PI+feedforward tuning.

TODO

Pre-global models

  • 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

Installation

Required hardware

OR

Known issues

  • 2020 Outback (and possibly other 2020 models) require swapping following pins on the Subaru Car Harness 26-pin connector:

Pin 4 -> 10

Pin 10 -> 4

Pin 6 -> 8

Pin 8 -> 6

Pin 18 - > 24

Pin 24 -> 18

Pin 20 -> 22

Pin 22 -> 20

Subaru Car Harness pinout

  • Forester pre-2019 models Eyesight does not support LKAS and is not compatible with openpilot

Adding support for new model

Read first

Check if your car fingerprint is already added to any of the forks/branches

Clone a community fork

Openpilot community 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+)
    • martinl subaru-giraffe-devel - supports comma giraffe with relay, Eyesight on CAN2
    • martinl diy-giraffe-devel - supports DIY giraffe, Eyesight on CAN2

Flash panda

    • cd /data/openpilot/panda/board
    • killall boardd
    • make
    • reboot

Create fingerprint

  • 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

General troubleshooting

Test build and start openpilot

    • cd /data/openpilot
    • make
    • ./launch_openpilot.sh

Stop openpilot running from console

    • ssh in (second session)
    • killall manager.py

If everything else fails

    • restart car, reconnect panda and try again

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

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 Gen 2
  • 2014 - EyeSight Gen 3
  • 2016 - EyeSight Gen 4
  • 2018 - EyeSight Gen 5
  • 2020 - EyeSight Gen 6

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


Gen4 - 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

Gen5 - 2018+ Impreza, Crosstrek (Global platform)

  • ACC Hold (with electronic handbrake)

Gen6 - 2020+ Outback

  • LCA - Lane centering assist

Optional extras:

  • BSD - blind spot detection (2 radars with 75 degree FOV in rear corners)
    • LCA - lane change assistance
    • RCTA - reverse cross traffic 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.