adbctool is a convinent tool to let you quickly generate a nearly complete code for a new vehicle for Apollo.
You only have to do is to have the dbc file (which is a communication protocol for the car, which is usually made by the vehicle integrated company), and write a less 10 lines config for generate an encode/decode.
- opendbc is a project that opens the vehicle dbc protocol.
- openvehicles is an open car project that contains any vehicle information you want to know.
- whl-vehicles Apollo vehicle protocols based by opendbc.
You can install adbctool by following cmd.
pip3 install adbctoolFor local development (editable install):
python -m pip install -U pip setuptools
python -m pip install -e .Note: parser runs in strict DBC mode by default. Non-standard comment lines such as
# ... and // ... are treated as invalid syntax. Use standard DBC comment entries
(CM_ ...) in source files.
Generate c++ code based on dbc file.
vehicle dbc file: vehicle's dbc filevehicle type: vehicle typesender: the sender of the message, the control protocol template will be used for sender
Generate code using a specific sender name
# adbctool -f <vehicle.dbc> -t <vehicle_type> --sender <sender_name>
adbctool -f test/acura_ilx_2016_nidec.dbc -t acura_ilx --sender ADASOr generate code using a list of sender IDs (in hexadecimal)
# adbctool -f <vehicle.dbc> -t <vehicle_type> --sender_list <sender_id_hex>
adbctool -f test/acura_ilx_2016_nidec.dbc -t acura_ilx --sender_list 0x400