From f963ae892d6cafbcd7a173cc7a0fe81a326eb24c Mon Sep 17 00:00:00 2001 From: Max Hunt Date: Mon, 10 Feb 2020 18:11:44 +0000 Subject: [PATCH] Update --- object_tf_service.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/object_tf_service.py b/object_tf_service.py index a8e77ce..cfb2eb2 100755 --- a/object_tf_service.py +++ b/object_tf_service.py @@ -24,6 +24,8 @@ class tf_service(): def _callback(self, data): # Get index + if SIGKILL: + self._kill() for object_name in self._nodes: '''HORRIBLE HACK BEGIN''' if object_name == 'baxter::base': @@ -42,6 +44,8 @@ class tf_service(): (object_pose.orientation.x, object_pose.orientation.y, object_pose.orientation.z, object_pose.orientation.w), rospy.Time.now(), spawn_name,'gazebo_world') + def _kill(self): + rospy.signal_shutdown('User_requested') def gazebo_link_subscriber(self): global a @@ -54,5 +58,4 @@ class tf_service(): def init(): x = tf_service() - x.gazebo_link_subscriber() - + x.gazebo_link_subscriber() \ No newline at end of file