diff --git a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py index 0e645aa97daf33a47aee163c1c86853b4b136833..43435507b804709b3f4788c4e3b0db9254efd0df 100644 --- a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py +++ b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py @@ -40,7 +40,6 @@ h_reel = 0.234 #Hauteur d'un plot y_0 = 1500 #Milieu de l'image dist_roue = 0.25 #Distance entre les roues avant et les roues arrieres -dt = 0.1 #Frequence de calcul # class position: @@ -95,8 +94,10 @@ def distance_Chamfer(A_x, A_y, B_x, B_y): def motion_update(commande, position): - vitesse, direction = commande + vitesse, direction, FPS = commande x,y,theta = position + dt = 1/FPS + if direction ==0: new_x = x + dt*vitesse*cos(theta) diff --git a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/__pycache__/MCL.cpython-38.pyc b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/__pycache__/MCL.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6d426f2f120b2cedea24a7901344d108cb3b8225 Binary files /dev/null and b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/__pycache__/MCL.cpython-38.pyc differ diff --git a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/__pycache__/car_interface.cpython-38.pyc b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/__pycache__/car_interface.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..42a176b8d8bb0c9261b4e02d27862a2afb159d44 Binary files /dev/null and b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/__pycache__/car_interface.cpython-38.pyc differ diff --git a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/__pycache__/track_2_generator.cpython-38.pyc b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/__pycache__/track_2_generator.cpython-38.pyc index 62af523bf58ddf013f236695e14d99fc2abd4ca9..894fe1bdc11300f1a010521fa34eadf9b6cbd654 100644 Binary files a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/__pycache__/track_2_generator.cpython-38.pyc and b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/__pycache__/track_2_generator.cpython-38.pyc differ diff --git a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/__pycache__/utils.cpython-38.pyc b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/__pycache__/utils.cpython-38.pyc index 3609578e8506cb257ed1eb0623381c424e3a9f97..0275e8b4bf7d538834dfabcacacade777e7185ea 100644 Binary files a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/__pycache__/utils.cpython-38.pyc and b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/__pycache__/utils.cpython-38.pyc differ diff --git a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py index 7363448fa6c152822aa5d716f65386d1130c0924..997a53f42a83aaa8676fe38e3428b3579f7e8670 100644 --- a/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py +++ b/PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/yolov3/utils.py @@ -203,7 +203,7 @@ def draw_bbox(image, bboxes,liste_pos_car, CLASSES=YOLO_COCO_CLASSES, show_label #Determination de la position de la voiture #speed with 10= 3.8/40 - pos_car, liste_pos_car_temp = get_position(bboxes, (previous_command[0]*3.7/170, previous_command[1]/200*35/360*2*3.1415), liste_pos_car.liste) + pos_car, liste_pos_car_temp = get_position(bboxes, (previous_command[0]*3.7/170, previous_command[1]/200*35/360*2*3.1415, previous_command[2]), liste_pos_car.liste) liste_pos_car.update_liste(liste_pos_car_temp) """Algorithme de conduite""" @@ -633,7 +633,7 @@ def detect_realtime(Yolo, output_path, input_size=416, show=False, CLASSES=YOLO_ print("Time: {:.2f}ms, {:.1f} FPS".format(ms, fps)) - frame, command, liste_pos_car = draw_bbox(original_frame, bboxes,liste_pos_car, CLASSES=CLASSES, rectangle_colors=rectangle_colors, ser=ser, previous_command=(10, command)) + frame, command, liste_pos_car = draw_bbox(original_frame, bboxes,liste_pos_car, CLASSES=CLASSES, rectangle_colors=rectangle_colors, ser=ser, previous_command=(10, command, fps)) # CreateXMLfile("XML_Detections", str(int(time.time())), original_frame, bboxes, read_class_names(CLASSES)) image = cv2.putText(frame, "Time: {:.1f}FPS".format(fps), (0, 30), cv2.FONT_HERSHEY_COMPLEX_SMALL, 1, (0, 0, 255), 2)