from robot.motors import Motors from motob import WheelMotob from behaviours.avoid_collision_behaviour import AvoidCollisionBehaviour from sensobs.ultra_sensob import UltraSensob from sensors.ultrasonic import Ultrasonic if __name__ == '__main__': bb = Bbcon() # Line detection ir_sensor = ir.ReflectanceSensors(auto_calibrate=True) line_sensob = LineSensob(ir_sensor) avl = AvoidLineBehaviour(bb, line_sensob) bb.add_sensor(ir_sensor) bb.add_sensory_object(line_sensob) bb.add_behaviour(avl) bb.activate_behaviour(avl) # Motor motors = Motors() wheel_motob = WheelMotob(motors, bb.time_step) bb.motobs.append(wheel_motob) # Camera camera_sensor = cam.Camera(img_rot=180) follow_red_sensob = RedDetector(camera_sensor)