def init_sensor_test(self, topic, topic_type): rospy.init_node("morse_testing", log_level=rospy.DEBUG) testlogger.debug("subscribe and wait %s (%s)" % (topic, topic_type.__name__)) self.assertTrue(self.subscribe_and_wait_for_message(topic, topic_type) != None) self.cmd_stream = rospy.Publisher("/ATRV/MotionVW", Twist) testlogger.debug("init sensor OK %s" % topic) return self.sensor_message
def init_sensor_test(self, topic, topic_type): rospy.init_node('morse_testing', log_level=rospy.DEBUG) testlogger.debug("subscribe and wait %s (%s)"%(topic, topic_type.__name__)) self.assertTrue(self.subscribe_and_wait_for_message(topic, topic_type) != None) self.cmd_stream = rospy.Publisher('/ATRV/MotionVW', Twist) testlogger.debug("init sensor OK %s"%topic) return self.sensor_message
def init_sensor_test(self, topic, topic_type): rospy.init_node('morse_testing', log_level=rospy.DEBUG) testlogger.debug("subscribe and wait %s (%s)"%(topic, topic_type.__name__)) tmp = self.subscribe_and_wait_for_message(topic, topic_type) if not tmp: # remove once https://github.com/ros/genpy/pull/9 is merged testlogger.error("please patch ROS, see patches/ros_python3.diff") self.assertTrue(tmp != None) self.cmd_stream = rospy.Publisher('/ATRV/MotionVW', Twist) testlogger.debug("init sensor OK %s"%topic) return self.sensor_message
def cleanup_sensor_test(self): self.sensor_sub.unregister() testlogger.debug("cleanup sensor")