Skip to content

Commit

Permalink
Modules used located in workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
ReyDoran committed Jan 8, 2024
1 parent 14ed36a commit 3fc453f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion manager/manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sys
import re
import psutil
import shutil
import time
if ("noetic" in str(subprocess.check_output(['bash', '-c', 'echo $ROS_DISTRO']))):
import rosservice
Expand Down Expand Up @@ -201,7 +202,10 @@ def on_run_application(self, event):
f.close()

self.unpause_sim()
self.application_process = subprocess.Popen(["python3", application_file], stdout=sys.stdout, stderr=subprocess.STDOUT,
shutil.copyfile(application_file, "/workspace/code/exercise.py")
application_folder = application_file.replace("/exercise.py", "")
shutil.copytree(application_folder, "/workspace/code", dirs_exist_ok=True)
self.application_process = subprocess.Popen(["python3", "/workspace/code/exercise.py"], stdout=sys.stdout, stderr=subprocess.STDOUT,
bufsize=1024, universal_newlines=True)
else:
print('errors')
Expand Down

0 comments on commit 3fc453f

Please sign in to comment.