diff --git a/robomaster_pi/command_executer.py b/robomaster_pi/command_executer.py index 92db67dabf85a7521cb264e41b566836df9e446c..90c977f433cc00b1bcfefb388532e5e4287edd76 100644 --- a/robomaster_pi/command_executer.py +++ b/robomaster_pi/command_executer.py @@ -17,7 +17,9 @@ class CommandExecutor(Node): def execute_command_callback(self, msg): command = msg.data.split() # Split the received string into command and name - if len(command) >= 2: + if command[0] == "kill": + kill_node(command[1]) + else len(command) >= 2: name = command[0] launch_command = " ".join(command[1:]) # Execute the launch command in a separate thread