[UAVCAN v0] DSDL file paths in windows

Hi!

I am using pyinstaller to generate a Windows .exe file out of my python project.
When execuring the .exe file it complains about missing DSDL path (path goes to …/AppData/Local/Temp/… etc) when calling load_dsdl() from uavcan/__init__.py

I can understand this. However, does anyone have an idea how to

  1. include DSDL files into the pyinstaller generated package and make uavcan use them? Or
  2. Specify relative paths in the python project so that stadnard DSDL files can be found at pre-defined location. The same for vendor_specific_types?

Or do I simply need to provide user input to both “dsdl_files”- and “uavcan_vendor_specific_types” paths and load them manually at startup?

Kinds Regards

This application might help you as an example, perhaps. It does not use DSDL, but it uses other resource files packaged tohether with the executables using PyInstaller:

Thanks! I have a look.

If I put my own_namesace folder with DSDL files in $HOME/uavcan_vendor_specific_types, and do not call load_dsdl() from my own script, the parsed contents bewcomes present under uavcan.thirdparty.own_namespace as usual.

But if I call load_dsdl([path]) with custom path to my namespace (have moved it from $HOME/uavcan_vendor_specific_types in to /tmp ) the uavcan.thirdparty.own_namespace is not present. Attached is a debug session screendump were thirdparty is missing own_namespace

Am I doing something wrong or does load_dsdl() behave differently when parsing custom path compared to ~/uavcan_vendor_specific_types ?

Sorry… My fault. I cannot import thirdparty before loading dsdl…

1 Like