This project allows an external radar to integrate with OpenPilot, improving its perception capabilities.
Some vehicles with openpilot installed can only use Vision-Only Adaptive Cruise Control (VOACC). By adding an external radar to the car, sensor fusion enables more accurate lead car speed detection and distance measurement, significantly improving safety and performance.
The guide and code are designed for Toyota vehicles. If using a different vehicle, you will need:
- Modify the code to access external radar interface.
- Adjust the distance from the vehicle front to the radar if mounting in front of the vehicle.
Before installing this addon, ensure you have the following:
- A car that already has openpilot installed.
- The car must support openpilot longitudinal control.
- The car does not have radar support. (e.g. Nissan, Volkswagen, Mazda, Subaru...)
- A comma 3 or 3X device running openpilot version 0.9.8 or above.
- Radar, ~$236 USD
- GoPro Accessories:
- Cell Phone Holder, ~$4.0 USD
- 1/4 inch Mount, ~$1.0 USD
- Short Screw, ~$1.2 USD
- Quick Release Buckle Mount, ~$1.0 USD
- Short Screw, ~$1.2 USD
- Flat Adhesive Mount, ~$0.99 USD
- 4 Pins Phoenix Type Connector, ~$2.00 USD
- for other harness, please refer to: Harness Schema
- You might need to connect VCC and GND to the OBD2 port if there is excessive power draw.
Connect the radar and openpilot to the OBD2 cable as follows:
Harness (Car Side) | Radar Cable |
---|---|
CAN1L | CAN L (green) |
CAN1H | CAN H (yellow) |
GND | Ground (black) |
IGN | 12V (red) |
Upload to /data/openpilot/opendbc/dbc/u_radar.dbc
- Upload to /data/openpilot/opendbc/dbc/u_radar_config.py
- Change radar settings:
# manually terminate openpilot
tmux a
press "<ctrl> + c" several times
# apply settings
cd /data/openpilot/opendbc/dbc/ && python u_radar_config.py
Upload to /data/openpilot/opendbc/car/radar_interface.py
- upload panda.diff to /data
- Apply changes:
cd /data/openpilot/ && git apply ../card.diff
- Mounting Bracket: The provided mounting bracket is designed as a temporary solution to allow easy adjustment and removal of the radar unit.
- CAN Message Conflict: This proof of concept may trigger errors due to conflicts. A CAN filter or gateway can resolve them.
- Power Overdrawn: The radar requires more than 0.2A; connect to OBD2 if the current source can't supply enough power.
Contributions are welcome! Please submit issues or pull requests to improve functionality.
This project is licensed under MIT Non-Commercial License.
See the LICENSE file for complete details.
Thanks to the openpilot community for ongoing support and development.