Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.rates[self.current_label] = (correct, len(msg.strings), float(correct)/float(len(msg.strings)))
def run(self):
#gen.add("iss_model_resolution", double_t, 0, "A double parameter", 0.01, 0.005, 0.02)
#gen.add("pfhrgb_radius_search", double_t, 0, "A double parameter", 0.06, 0.03, 0.08)
iss_resolutions = [0.002, 0.0025, 0.003, 0.0035, 0.004, 0.0045, 0.005]
pfhrgb_resolutions = [0.04]
counter = 0
for ir in iss_resolutions:
for pr in pfhrgb_resolutions:
self.evaluate_parameters(ir, pr, counter)
counter = counter + 1
if __name__ == '__main__':
rospy.init_node('optimizer')
osrv = QuasimodoOptimizer(rospy.get_name())
osrv.run()
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()