-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
527549db-a8e9-4a75-80fe-68d24955ff8b/40
- Loading branch information
Showing
68 changed files
with
1,247 additions
and
775 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,39 @@ | ||
# What is a car port? | ||
|
||
A car port enables openpilot support on a particular car. Each car model openpilot supports needs to be individually ported. All car ports live in `openpilot/selfdrive/car/car_specific.py` and `opendbc_repo/opendbc/car`. | ||
A car port enables openpilot support on a particular car. Each car model openpilot supports needs to be individually ported. The complexity of a car port varies depending on many factors including: | ||
|
||
The complexity of a car port varies depending on many factors including: | ||
* existing openpilot support for similar cars | ||
* architecture and APIs available in the car | ||
|
||
|
||
# Structure of a car port | ||
|
||
Virtually all car-specific code is contained in two other repositories: [opendbc](https://github.com/commaai/opendbc) and [panda](https://github.com/commaai/panda). | ||
|
||
## opendbc | ||
|
||
Each car brand is supported by a standard interface structure in `opendbc/car/[brand]`: | ||
|
||
* `interface.py`: Interface for the car, defines the CarInterface class | ||
* `carstate.py`: Reads CAN from car and builds openpilot CarState message | ||
* `carcontroller.py`: Builds CAN messages to send to car | ||
* `carstate.py`: Reads CAN messages from the car and builds openpilot CarState messages | ||
* `carcontroller.py`: Control logic for executing openpilot CarControl actions on the car | ||
* `[brand]can.py`: Composes CAN messages for carcontroller to send | ||
* `values.py`: Limits for actuation, general constants for cars, and supported car documentation | ||
* `radar_interface.py`: Interface for parsing radar points from the car | ||
* `radar_interface.py`: Interface for parsing radar points from the car, if applicable | ||
|
||
## panda | ||
|
||
* `board/safety/safety_[brand].h`: Brand-specific safety logic | ||
* `tests/safety/test_[brand].py`: Brand-specific safety CI tests | ||
|
||
## openpilot | ||
|
||
For historical reasons, openpilot still contains a small amount of car-specific logic. This will eventually be migrated to opendbc or otherwise removed. | ||
|
||
* `selfdrive/car/car_specific.py`: Brand-specific event logic | ||
|
||
# Overiew | ||
# Overview | ||
|
||
[Jason Young](https://github.com/jyoung8607) gave a talk at COMMA_CON with an overview of the car porting process. The talk is available on YouTube: | ||
|
||
https://youtu.be/KcfzEHB6ms4?si=5szh1PX6TksOCKmM | ||
https://www.youtube.com/watch?v=XxPS5TpTUnI |
Submodule opendbc_repo
updated
19 files
+26 −2 | opendbc/can/common.cc | |
+1 −0 | opendbc/can/common.h | |
+1 −0 | opendbc/can/common.pxd | |
+1 −0 | opendbc/can/common_dbc.h | |
+2 −0 | opendbc/can/dbc.cc | |
+106 −66 | opendbc/can/tests/test_checksums.py | |
+1 −2 | opendbc/car/body/carcontroller.py | |
+8 −3 | opendbc/car/hyundai/carstate.py | |
+8 −0 | opendbc/car/hyundai/fingerprints.py | |
+7 −0 | opendbc/car/hyundai/values.py | |
+1 −0 | opendbc/car/structs.py | |
+2 −0 | opendbc/car/tests/routes.py | |
+1 −0 | opendbc/car/torque_data/override.toml | |
+22 −6 | opendbc/car/toyota/carcontroller.py | |
+10 −1 | opendbc/car/toyota/carstate.py | |
+5 −0 | opendbc/car/toyota/interface.py | |
+2 −2 | opendbc/car/volkswagen/values.py | |
+243 −0 | opendbc/dbc/fca_giorgio.dbc | |
+7 −1 | opendbc/dbc/hyundai_kia_generic.dbc |
Submodule panda
updated
90 files
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.