def main(): rospy.init_node('stringTesterNode') testCenter = TestCenter() rospy.Service('stringTest', StringTest, lambda msg: (testCenter.runTest(msg.testType),)) rospy.spin()
def main(passes, testType, filename): rospy.init_node('testRunner') times = [] testCenter = TestCenter() for _ in xrange(passes): times.append(testCenter.runTest(testType)) with open(filename, 'w') as f: f.write(json.dumps(SIZES)) f.write('\n') f.write(json.dumps(times)) f.write('\n')