Skip to content
Snippets Groups Projects
Commit f235d72b authored by Emil Harlan's avatar Emil Harlan
Browse files

a

parent f7da31c4
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,10 @@ class CommandExecutor(Node):
def execute_command(self, name, command, parameter):
try:
process_handle = subprocess.Popen(["ros2", "launch", "robot_loc", command, parameter], text=True)
if parameter == "-":
process_handle = subprocess.Popen(["ros2", "launch", "robot_loc", command], text=True)
else:
process_handle = subprocess.Popen(["ros2", "launch", "robot_loc", command, parameter], text=True)
self.running_processes[name] = process_handle
process_handle.wait() # Wait for the process to finish
if name in self.running_processes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment