Skip to content
Snippets Groups Projects
Commit 14a75ae0 authored by Lacroix Paul's avatar Lacroix Paul
Browse files

azdfe

parent 1c7c0408
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ def boite2coord(x1,y1,x2,y2):
d = F*h_reel/abs(y1-y2) - 0.3982
ypmax=960/2
ymax=0.54
ymax=0.6
#y_r = -((x1+x2)/2 - ypmax)*d/F
tan_theta=((x1+x2)/2-ypmax)/ypmax*ymax
theta = -atan(tan_theta)
......@@ -132,16 +132,16 @@ def distance_Chamfer(A_x, A_y, B_x, B_y):
return res
def orientation_voiture(x,y):
x1,y1 = x-centre_x, y-centre_y
if x<0:
x2,y2 = x1+diametre/2, y1
theta = atan(y2/x2)
return theta-3.1415/2
else:
x2,y2 = x1-diametre/2, y1
theta = atan(y2/x2)
return theta-3.1415/2
# def orientation_voiture(x,y):
# x1,y1 = x-centre_x, y-centre_y
# if x<0:
# x2,y2 = x1+diametre/2, y1
# theta = atan(y2/x2)
# return theta-3.1415/2
# else:
# x2,y2 = x1-diametre/2, y1
# theta = atan(y2/x2)
# return theta-3.1415/2
def motion_update(commande, position):
......
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment