Cleanup of all ROS publishers
(self)
| 160 | # pylint: enable=line-too-long |
| 161 | |
| 162 | def destroy(self): |
| 163 | """ |
| 164 | Cleanup of all ROS publishers |
| 165 | """ |
| 166 | if self.stack_process and self.stack_process.poll() is None: |
| 167 | rospy.loginfo("Sending SIGTERM to stack...") |
| 168 | os.killpg(os.getpgid(self.stack_process.pid), signal.SIGTERM) |
| 169 | rospy.loginfo("Waiting for termination of stack...") |
| 170 | self.stack_process.wait() |
| 171 | time.sleep(5) |
| 172 | rospy.loginfo("Terminated stack.") |
| 173 | |
| 174 | rospy.loginfo("Stack is no longer running") |
| 175 | self.world_info_publisher.unregister() |
| 176 | self.map_file_publisher.unregister() |
| 177 | self.vehicle_status_publisher.unregister() |
| 178 | self.vehicle_info_publisher.unregister() |
| 179 | self.waypoint_publisher.unregister() |
| 180 | self.stack_process = None |
| 181 | rospy.loginfo("Cleanup finished") |
| 182 | |
| 183 | def on_vehicle_control(self, data): |
| 184 | """ |
no outgoing calls
no test coverage detected