def __init__(self, img_q, response_q): threading.Thread.__init__(self) Logger.__init__(self, "YOLO") self.log("Intialized.") self.image_queue = img_q self.response_queue = response_q self.image = None
def __init__(self): """ Underlying channel name is given based on its classname (e.g. NPLogger) and an individual, unique instance name, assigned at runtime. This instance channel is a subchannel of the class channel, so all messages are routed through both channels. """ class_name = self.__class__.__name__ instance_name = id(self) full_name = "%s.%s" % (class_name, instance_name) Logger.__init__(self, full_name)
def __init__(self, img_q, trig_q, stream): threading.Thread.__init__(self) Logger.__init__(self, "ROBOT_TRACKER") self.log("Initializing.") self.image_queue = img_q self.trigger_queue = trig_q self.detector = apriltag.Detector() self.video_stream = stream self.window_name = "robot_win" self.stop_ = False self.target_id = 0 self.ready = False self.was_ready = 0
def __init__(self, obj_q, trig_q, img_q): threading.Thread.__init__(self) Logger.__init__(self, "SMART_ENV") self.response_queue = obj_q self.trigger_queue = trig_q self.image_queue = img_q rospy.init_node('smart_environment', anonymous=True) #self.rate = rospy.Rate(10) # 10hz self.ros_listener = rospy.Subscriber("/smart_environment/request", String, self.listen_callback) self.ros_sender = rospy.Publisher("/smart_environment/response", String, queue_size=10)
def __init__(self, learner): Logger.__init__(self, "ColourLogger") self.learner = learner self.full_name = learner.agent_name # on new point self.data_logger.info("lang.name,r,g,b,word,x,y,z") # probe point & mean point self.probe_logger = Logger("colour.sample") self.mean_logger = Logger("colour.mean") # output header CSV self.probe_logger.info("lang.name,word") self.mean_logger.info("lang.name,word,r,g,b")
def __init__(self, log_path, console=True): Logger.__init__(self, __name__, log_path, console) self.current_datetime = datetime.datetime.now()