Skip to content

Instantly share code, notes, and snippets.

@rpapallas
Last active March 23, 2023 12:52
Show Gist options
  • Save rpapallas/8f2a67fc794afda2bdfe1980808acd35 to your computer and use it in GitHub Desktop.
Save rpapallas/8f2a67fc794afda2bdfe1980808acd35 to your computer and use it in GitHub Desktop.
Importing scripts
# ...
# ** Don't change this path **
PROJECT_DIR = os.path.expanduser('~/catkin_ws/src/group_project')
import sys
sys.path.insert(0, f'{PROJECT_DIR}/scripts')
# **Import files in scripts from here ...**
# for example a class called CluedoDetector in scripts/cluedo_detector.py can be imported like so:
from cluedo_detector import CluedoDetector
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment