## DBC file basics
A DBC file encodes, in a humanly readable way, the information needed to understand a vehicle's CAN bus traffic. A vehicle might have multiple CAN buses and every CAN bus is represented by its own dbc file.
Wondering what's the DBC file format? [Here](http://www.socialledge.com/sjsu/index.php?title=DBC_Format) and [Here](https://github.com/stefanhoelzl/CANpy/blob/master/docs/DBC_Specification.md) a couple of good overviews.
## How to start reverse engineering cars
[opendbc](https://github.com/commaai/opendbc) is integrated with [cabana](https://community.comma.ai/cabana/).
Use [panda](https://github.com/commaai/panda) to connect your car to a computer.
## How to use reverse engineered DBC
To create custom CAN simulations or send reverse engineered signals back to the car you can use [CANdevStudio](https://github.com/GENIVI/CANdevStudio) project.
## DBC file preprocessor
DBC files for different models of the same brand have a lot of overlap. Therefore, we wrote a preprocessor to create DBC files from a brand DBC file and a model specific DBC file. The source DBC files can be found in the generator folder. After changing one of the files run the generator.py script to regenerate the output files. These output files will be placed in the root of the opendbc repository and are suffixed by _generated.
## Good practices for contributing to opendbc
- Comments: the best way to store comments is to add them directly to the DBC files. For example:
```
CM_ SG_ 490 LONG_ACCEL "wheel speed derivative, noisy and zero snapping";
```
is a comment that refers to signal `LONG_ACCEL` in message `490`. Using comments is highly recommended, especially for doubts and uncertainties. [cabana](https://community.comma.ai/cabana/) can easily display/add/edit comments to signals and messages.
- Units: when applicable, it's recommended to convert signals into physical units, by using a proper signal factor. Using a SI unit is preferred, unless a non-SI unit rounds the signal factor much better.
For example:
```
SG_ VEHICLE_SPEED : 7|15@0+ (0.00278,0) [0|70] "m/s" PCM
```
is better than:
```
SG_ VEHICLE_SPEED : 7|15@0+ (0.00620,0) [0|115] "mph" PCM
```
However, the cleanest option is really:
```
SG_ VEHICLE_SPEED : 7|15@0+ (0.01,0) [0|250] "kph" PCM
```
- Signal size: always use the smallest amount of bits possible. For example, let's say I'm reverse engineering the gas pedal position and I've determined that it's in a 3 bytes message. For 0% pedal position I read a message value of `0x00 0x00 0x00`, while for 100% of pedal position I read `0x64 0x00 0x00`: clearly, the gas pedal position is within the first byte of the message and I might be tempted to define the signal `GAS_POS` as:
```
SG_ GAS_POS : 7|8@0+ (1,0) [0|100] "%" PCM
```
However, I can't be sure that the very first bit of the message is referred to the pedal position: I haven't seen it changing! Therefore, a safer way of defining the signal is:
```
SG_ GAS_POS : 6|7@0+ (1,0) [0|100] "%" PCM
```
which leaves the first bit unallocated. This prevents from very erroneous reading of the gas pedal position, in case the first bit is indeed used for something else.
没有合适的资源?快使用搜索试试~ 我知道了~
开源项目openai中的dbc
共158个文件
dbc:120个
py:17个
gitignore:4个
需积分: 2 2 下载量 34 浏览量
2023-05-06
13:36:01
上传
评论
收藏 621KB ZIP 举报
温馨提示
开源项目openai中的dbc
资源推荐
资源详情
资源评论
收起资源包目录
开源项目openai中的dbc (158个子文件)
dbc.cc 9KB
parser.cc 9KB
common.cc 9KB
packer.cc 3KB
ford_lincoln_base_pt.dbc 787KB
cadillac_ct6_object.dbc 227KB
FORD_CADS.dbc 211KB
gm_global_a_lowspeed_1818125.dbc 183KB
vw_mqb_2010.dbc 108KB
hyundai_kia_generic.dbc 90KB
hyundai_2015_ccan.dbc 80KB
tesla_radar.dbc 77KB
hyundai_2015_mcan.dbc 76KB
vw_golf_mk4.dbc 73KB
ford_cgea1_2_ptcan_2011.dbc 68KB
toyota_2017_ref_pt.dbc 67KB
ESR.dbc 64KB
tesla_can.dbc 52KB
ford_cgea1_2_bodycan_2011.dbc 48KB
gm_global_a_object.dbc 44KB
mazda_2017.dbc 28KB
toyota_nodsu_pt_generated.dbc 28KB
toyota_tnga_k_pt_generated.dbc 25KB
toyota_new_mc_pt_generated.dbc 25KB
bmw_e9x_e8x.dbc 24KB
hyundai_i30_2014.dbc 23KB
_toyota_2017.dbc 22KB
honda_accord_2018_can_generated.dbc 21KB
honda_crv_ex_2017_can_generated.dbc 21KB
honda_civic_hatchback_ex_2017_can_generated.dbc 21KB
hyundai_canfd.dbc 21KB
honda_civic_ex_2022_can_generated.dbc 21KB
acura_rdx_2020_can_generated.dbc 20KB
honda_insight_ex_2019_can_generated.dbc 20KB
hyundai_kia_mando_corner_radar_generated.dbc 18KB
honda_clarity_hybrid_2018_can_generated.dbc 17KB
hyundai_kia_mando_front_radar_generated.dbc 17KB
honda_civic_touring_2016_can_generated.dbc 16KB
honda_odyssey_exl_2018_generated.dbc 16KB
honda_fit_hybrid_2018_can_generated.dbc 15KB
honda_odyssey_extreme_edition_2018_china_can_generated.dbc 15KB
chrysler_pacifica_2017_hybrid_generated.dbc 14KB
honda_fit_ex_2018_can_generated.dbc 14KB
acura_ilx_2016_can_generated.dbc 14KB
honda_crv_touring_2016_can_generated.dbc 14KB
mazda_3_2019.dbc 14KB
acura_rdx_2018_can_generated.dbc 14KB
honda_crv_executive_2016_can_generated.dbc 14KB
ford_fusion_2018_adas.dbc 14KB
subaru_global_2017_generated.dbc 13KB
gm_global_a_powertrain_generated.dbc 13KB
volvo_v40_2017_pt.dbc 13KB
gm_global_a_powertrain.dbc 12KB
subaru_global_2020_hybrid_generated.dbc 11KB
_subaru_global.dbc 10KB
subaru_outback_2019_generated.dbc 10KB
subaru_outback_2015_generated.dbc 10KB
_bosch_2018.dbc 10KB
toyota_tss2_adas.dbc 9KB
subaru_forester_2017_generated.dbc 9KB
gm_global_a_high_voltage_management.dbc 9KB
toyota_adas.dbc 9KB
nissan_x_trail_2017.dbc 9KB
cadillac_ct6_powertrain.dbc 9KB
nissan_leaf_2018.dbc 9KB
_subaru_preglobal_2015.dbc 9KB
chrysler_pacifica_2017_hybrid.dbc 8KB
chrysler_ram_dt_generated.dbc 8KB
volvo_v60_2015_pt.dbc 8KB
tesla_powertrain.dbc 8KB
toyota_prius_2010_pt.dbc 7KB
toyota_iQ_2009_can.dbc 7KB
chrysler_pacifica_2017_hybrid_private_fusion.dbc 7KB
_honda_common.dbc 7KB
chrysler_ram_hd_generated.dbc 7KB
toyota_radar_dsu_tssp.dbc 6KB
_stellantis_common.dbc 6KB
mercedes_benz_e350_2010.dbc 6KB
acura_ilx_2016_nidec.dbc 5KB
ford_fusion_2018_pt.dbc 5KB
honda_clarity_hybrid_2018_can.dbc 5KB
luxgen_s5_2015.dbc 5KB
honda_civic_touring_2016_can.dbc 4KB
_nidec_common.dbc 4KB
honda_odyssey_exl_2018.dbc 4KB
comma_body.dbc 3KB
honda_fit_hybrid_2018_can.dbc 3KB
toyota_nodsu_pt.dbc 3KB
gm_global_a_lowspeed.dbc 3KB
honda_odyssey_extreme_edition_2018_china_can.dbc 3KB
honda_civic_ex_2022_can.dbc 3KB
subaru_global_2017.dbc 3KB
honda_fit_ex_2018_can.dbc 2KB
cadillac_ct6_chassis.dbc 2KB
_bosch_adas_2018.dbc 2KB
acura_ilx_2016_can.dbc 2KB
honda_crv_executive_2016_can.dbc 2KB
chrysler_ram_dt.dbc 2KB
honda_crv_touring_2016_can.dbc 2KB
honda_accord_2018_can.dbc 2KB
共 158 条
- 1
- 2
资源评论
Vg_2018
- 粉丝: 7
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功