Mazda - commaai/openpilot Wiki

Mazda

◄ Home

Overview

Changing source code, using weighted lockout mitigation or changing EPS is all done at your own risk.

The Mazda community is strong, and most Mazda models are community supported with limitations. Out of the box, only CX-9 2021 is officially supported. For all other models OpenPilot is only available in dashcam mode due to a steering lockout that occurs when driver does not touch the steering wheel for more than 5 seconds. Using Stock OpenPilot with Mazda models that have limitations requires source code changes, and always keeping your hands on the wheel or use of a weighted steering lockout mitigation or changing Electronic Power Steering motor (EPS) to 2021 CX-9 where compatible. Failure to overcome the steering lockout results in the car not responding to steer commands from OpenPilot.

To change source code from dashcam only mode, change the line in selfdrive/car/mazda/interface.py here(https://github.com/commaai/openpilot/blob/master/selfdrive/car/mazda/interface.py#L25) from:

ret.dashcamOnly = candidate not in [CAR.CX9_2021]

to

ret.dashcamOnly = False

If you don't want to make source code change, you can use Mazda community fork, see the link at the bottom of this page.

Make-Specific Terms

For general terms, go here.

Mazda I-ACTIVSENSE is an umbrella term that Mazda uses to describe a series of advanced safety and driver assistance technologies such as ACC, LKAS, Blind-spot monitoring, Smart City brakes and so on. Most models/trims from 2017 and newer come with ACC and LKAS as standard options.

Term Abbreviation Definition
Mazda Radar Cruise Control MRCC Mazda Adaptive Cruise Control - ACC
Lane-Keep Assist System LAS Mazda LKAS

Supported models

Official Community Supported Models

Community Supported Models with Limitation

Note: Some earlier year models 2016-2017 models that are equipped with LKAS are known to work with the Community fork but may require a different connector than the Mazda development connector sold at Comma shop.

Mazda OpenPilot Capabilities

Lateral Control

Mazda LKAS is not available on low speeds. In particular, LKAS is not available until the car drives above 32mph/52kph. LKAS gets disabled when the speed goes below 28mpg/45kph. When OP is engaged but stock LKAS is not available, OP continues to be engaged but will not steer and will display a warning about steering being unavailable.

Torque

CX-9 2019-2021 offer the best torque among Mazda cars. They offer twice the torque compared to other models/years allowing them to make tighter turns even on city streets. For other cars the available steering torque is adequate for most highway driving conditions. City driving requires driver intervention on sharp turns.

Minimum Speeds

Longitudinal Control

Longitudinal control is not supported by OP with Mazda. OP relies on the stock MRCC to control speed. MRCC support follow-to-stop to 0mph and automatic resume if the stop is less than three seconds. OP improve on that by allowing the car to resume without driver intervention after longer delays. Even though MRCC works down to 0mph, the lowest allowed set speed is 19mph.

Custom solutions:

Note: Mazda harness is now available at comma shop. Look for "Mazda Development" when you select a vehicle.

Harness Connector parts:

Harness wiring:

Steering Lockout Mitigation

Developer TODOs

See Also