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

a

parent 3e0bf9c6
No related branches found
No related tags found
No related merge requests found
......@@ -19,12 +19,12 @@ class CommandExecutor(Node):
command = msg.data.split() # Split the received string into command and name
if command[0] == "kill":
kill_node(command[1])
else len(command) >= 2:
else:
name = command[0]
launch_command = " ".join(command[1:])
# Execute the launch command in a separate thread
threading.Thread(target=self.execute_command, args=(name, launch_command)).start()
else:
self.get_logger().error("Invalid command format.")
def execute_command(self, name, launch_command):
......
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