From 7c52691e25b45fd1a3a83b0ff3a80723334020c5 Mon Sep 17 00:00:00 2001 From: Richardvdketterij Date: Thu, 15 Feb 2024 17:21:52 +0100 Subject: [PATCH] don't spin inside the node, let the outside user determine how to spin this node and how to catch exceptions properly --- smach_ros/smach_ros/introspection.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/smach_ros/smach_ros/introspection.py b/smach_ros/smach_ros/introspection.py index 038d645..1e969d0 100644 --- a/smach_ros/smach_ros/introspection.py +++ b/smach_ros/smach_ros/introspection.py @@ -24,14 +24,6 @@ class IntrospectionClient(Node): def __init__(self, node_name='introspection_client', **kwargs): Node.__init__(self, node_name, **kwargs) - self._executor = SingleThreadedExecutor() - self._executor.add_node(self) - self._spinner = threading.Thread(target=self._executor.spin) - self._spinner.start() - - def __del__(self): - self._executor.shutdown() - self._spinner.join() def get_servers(self): """Get the base names that are broadcasting smach states.""" @@ -277,15 +269,6 @@ def __init__(self, server_name, state, path): self._state = state self._path = path - self._executor = SingleThreadedExecutor() - self._executor.add_node(self) - self._spinner = threading.Thread(target=self._executor.spin) - self._spinner.start() - - def __del__(self): - self._executor.shutdown() - self._spinner.join() - def start(self): # Construct proxies self.construct(self._server_name, self._state, self._path)