def __init__(self): picar.setup() self.REFERENCES = [20.5, 25.0, 28.0, 21.5, 20.5] # self.calibrate = True self.calibrate = False self.forward_speed = 40 self.turning_angle = 45 self.delay = 0.0005 self.fw = front_wheels.Front_Wheels(db='config') self.bw = back_wheels.Back_Wheels(db='config') self.lf = Line_Follower.Line_Follower() self.lf.references = self.REFERENCES self.fw.ready() self.bw.ready() self.fw.turning_max = 60
REFERENCES = [200, 200, 200, 200, 200] # calibrate = True calibrate = False forward_speed = 80 backward_speed = 70 turning_angle = 40 dooms_day = False max_off_track_count = 40 delay = 0.0005 fw = front_wheels.Front_Wheels(db='config') bw = back_wheels.Back_Wheels(db='config') lf = Line_Follower.Line_Follower() lf.references = REFERENCES fw.ready() bw.ready() fw.turning_max = 45 # Picar Ultrasonic init UA = Ultrasonic_Avoidance.Ultrasonic_Avoidance(20) # PICAR ORDERS def order(value): if "SPEED" in value.upper(): speed = value.split(':') bw.speed = int(speed[1])