[ROS2 eloquent] import funtion from other python file in launch

asked 2020-04-09 09:12:07 -0500

Andreas Ziegler gravatar image

In my launch folder, I have the files node.launch.py and helper.py

In the node.launch.py I want to import the function load from helper.py

from helper import load

when I use the launch file, I get the error:

[ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: No module named 'helper'

Do I make something wrong or is it not possible to import functions from other python files in ROS2 launch.py files?

edit retag flag offensive close merge delete