/
Compilation

Compilation

The routine to compile dronecan packet definitions into .c and .h files.

Dependencies

  1. Make sure a recent-ish version of python and pip is installed (I used python 3.10.12 and pip 25.0.1)

  2. In a convenient place (I used my Documents folder) on your computer, run the following from:

mkdir -p dronecan_datatype_compiler cd dronecan_datatype_compiler pip install empy==3.3.4 pip install pexpect git clone https://github.com/dronecan/dronecan_dsdlc git clone https://github.com/dronecan/pydronecan git clone https://github.com/dronecan/DSDL git clone https://github.com/dronecan/libcanard

Steps

  1. All packets should have the .uavcan extension and be placed in a folder named warg. You can nest this in other folders if you want, for example:

root/ |- Core |- dsdlc_generated/ |- src/ |- inc/ |- packets/ |- warg/ |- SetControlState.uavcan
  1. Ensure you are in the dronecan_datatype_compiler folder you made during setup

  2. Run cp -r /path/to/root/packets/warg .

  3. Run python dronecan_dsdlc/dronecan_dsdlc.py -O /path/to/root/Core/dsdlc_generated` DSDL/ardupilot DSDL/com DSDL/cuav DSDL/dronecan DSDL/uavcan warg

Related content