How to import my own functions to guidance modes files

Hi,

I’ve coded functions in order to simplify the writing of drone and camera movements in the guidance modes and I’m trying to use them the following way : all of the functions are in a file called ‘func.py’ under the directory ‘guidance/python/utils/’ and my guidance modes are in files under the directory ‘guidance/python/’ but I can’t manage to import the functions in my guidance modes files. I get the following error : E guidance (guidance-373) : ModuleNotFoundError: No module named ‘com_parrot_missions_samples_hello’.

How can I import such files, I’ve tried to add the file in the main ‘atom.mk’ without success. Would it be possible to get a sample on how it could be done ?

Thanks !

Hello,

Maybe it is missing a copy of the utils directory. Can you try to add:

LOCAL_COPY_DIRS := autopilot-plugins/guidance/python/utils:$(airsdk-hello.guidance-dir)/utils

For the equivalent of the module:

LOCAL_MODULE := airsdk-hello-autopilot-plugins

In your mission?

A copy of the utils directory was indeed missing. Thank you !

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.