Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
rate.sleep()
elif goal.command == "stop":
#stop to record the topics
rospy.loginfo('now the topic playing should stop')
rospy.loginfo(self.p.pid)
os.killpg(os.getpgid(self.p.pid), signal.SIGINT)
rospy.loginfo("I'm done")
else:
rospy.loginfo('goal.command is not valid')
if __name__ == '__main__':
rospy.init_node('rosbag_player')
RosbagPlayerServer(rospy.get_name())
rospy.spin()