Commit 08b48181 authored by Thomas Muller's avatar Thomas Muller
Browse files

Replace main.py

parent d9c4790a
......@@ -17,6 +17,7 @@ from Detection_elements_image import *
from Resolution_laby import *
from tracker import *
from Asservissement import *
from Affichage_signaux import *
#############################################################
......@@ -94,6 +95,13 @@ simuY = np.zeros((3, nb_pas)); # ligne 0 : yc, ligne 1 : u et ligne 2 : y
# [u[k-2], u[k-1], u[k]],
# [y[k-2], y[k-1], y[k]]]
signaux = np.array([[0],
[0],
[0],
[0],
[0],
[0]])
sat = 50; # saturation pour la commande envoyee aux servos
###########################################################################
......@@ -218,6 +226,13 @@ for frame in camera.capture_continuous(raw_capture, format="bgr", use_video_port
print("posX: ", posX,"posY: ", posY)
#print('yc = ', simuX[0,2], ', u = ', simuX[1,2], ' et y = ', simuX[2,2])
signaux = np.append(signaux, [[simuX[0,2]],
[simuY[0,2]],
[simuX[1,2]],
[simuY[1,2]],
[simuX[2,2]],
[simuY[2,2]]], axis=1)
# Decalage temporel de la memorisation des pas
swap(simuX)
swap(simuY)
......@@ -257,3 +272,6 @@ send_string += "\n" # pluto \0 ?
# Envoie la chaine de caractere encodee en utf8
ser.write(send_string.encode('utf-8'))
np.save("sigaux.npy", signaux)
#affiche_signaux(signaux)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment