From a89977ca4519661a863bfa73e728a76e2d0b8256 Mon Sep 17 00:00:00 2001 From: Jakub Delicat Date: Tue, 3 Oct 2023 14:12:01 +0200 Subject: [PATCH] update Signed-off-by: Jakub Delicat --- safety_master_plugin/ros_master_wrapper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/safety_master_plugin/ros_master_wrapper.py b/safety_master_plugin/ros_master_wrapper.py index 0ecec0e..a7e4e4f 100644 --- a/safety_master_plugin/ros_master_wrapper.py +++ b/safety_master_plugin/ros_master_wrapper.py @@ -24,6 +24,8 @@ class ROSWrapper(Node): super().__init__("safety_master_plugin") self.robots_list_update_callback = None self.robot_info_update_callback = None + self.get_master_stop_state = None + self.get_restrictions = None self.robot_info_subscribers = {} self.master_stop_publisher = None @@ -123,7 +125,6 @@ class ROSWrapper(Node): def unregister_node(self): self.cancel_subscribers_and_publishers() - # rospy.signal_shutdown("Closing safety master plugin") def setup_get_master_stop_state_function(self, function): self.get_master_stop_state = function @@ -145,7 +146,7 @@ class ROSWrapper(Node): except NodeNameNonExistentError: pass - if len(published_topics_list): + if len(published_topics_list) > 0: robots_id_list.append(pioneer_id) self.robots_list_update_callback(robots_id_list)