Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Gen Vehicle Protocol Tool

It's a convinent tool to let you quickly generate a nearly complete code for a new vehicle.

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 `


sudo pip install pyyaml


The tool's input is :

  • vehicle dbc file : like lincoln's dbc file, put it under this folder
  • generator tool config file: for an example, a lincoln's is lincoln_conf.yml, detail you can see the example file of lincoln_conf.yml


python lincoln_conf.yml

Tool Framework

  • : a central control the overall generating progress and will call the scripts below
  • extract dbc info to an internal generator tool used yaml config, which will include a protocol name, id, how many vars in a protocol, every var's name, type, byte start, bit_start, bit_len etc. When we have these info, we can automitally generate code as we wish.
  • generate a proto file for this vehicle, which is used to store parsed info from CAN frame using these generated code.
  • generate protocol code (encoding and decoding CAN frame)according to the extract dbc meta.
  • gen_vehicle_controller_and_manager: generate vehicle controller and vehicle message manager according to our recent chassis canbus framework.
You can’t perform that action at this time.