Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit e036e22

Browse files
committedJun 1, 2024
modif avec goto et finalangle
1 parent 4f6bc87 commit e036e22

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed
 

‎raspberrypi/robots/team2024/PanneauxSolaires.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ def procedure(self):
6565
self.barriere.ferme_gauche()
6666
############################################ Avance
6767
pos =self.wb.get_position()
68-
self.wb.goto(pos[0],pos[1],theta=ang_approche)
69-
self.wb.goto(fin[0],fin[1],theta=ang_approche, linvelmax=POSITIONCONTROL_LINVELMAX_VALUE*0.2)
68+
self.wb.goto_stop(pos[0],pos[1],theta=ang_approche)
69+
self.wb.goto_stop(fin[0],fin[1],theta=ang_approche, linvelmax=POSITIONCONTROL_LINVELMAX_VALUE*0.2)
7070

7171
self.wb.set_parameter_value(POSITIONCONTROL_LINVELMAX_ID, POSITIONCONTROL_LINVELMAX_VALUE, FLOAT)
7272

‎raspberrypi/robots/team2024/RecupPlante.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ def procedure(self):
5050
print(length-self.radiusRobot)
5151
#print(self.wb.wheeledbase.getuuid())
5252
if(length-self.radiusRobot>0):
53-
self.wb.goto(stop[0],stop[1],theta=ang)
53+
self.wb.goto_stop(stop[0],stop[1],theta=ang)
5454

5555
######On prends
5656
self.barriere.nicole_oouuuuuvre()
5757

5858
stop=vecPos/length*(length-self.radiusPince)+rPos
59-
self.wb.goto(stop[0],stop[1], theta=ang, linvelmax=POSITIONCONTROL_LINVELMAX_VALUE*0.15)
59+
self.wb.goto_stop(stop[0],stop[1], theta=ang, linvelmax=POSITIONCONTROL_LINVELMAX_VALUE*0.15)
6060

6161
self.wb.set_parameter_value(POSITIONCONTROL_LINVELMAX_ID, POSITIONCONTROL_LINVELMAX_VALUE, FLOAT)
6262

@@ -77,19 +77,19 @@ def procedure(self):
7777
print(theta)
7878
print(ang)
7979

80-
self.wb.goto(rPos[0],rPos[1], theta=ang, angvelmax=POSITIONCONTROL_ANGVELMAX_VALUE*0.05)
81-
self.wb.goto(stop[0],stop[1],theta=ang, angvelmax=POSITIONCONTROL_ANGVELMAX_VALUE, linvelmax=POSITIONCONTROL_LINVELMAX_VALUE*0.3)
80+
self.wb.goto_stop(rPos[0],rPos[1], theta=ang, angvelmax=POSITIONCONTROL_ANGVELMAX_VALUE*0.05)
81+
self.wb.goto_stop(stop[0],stop[1],theta=ang, angvelmax=POSITIONCONTROL_ANGVELMAX_VALUE, linvelmax=POSITIONCONTROL_LINVELMAX_VALUE*0.3)
8282

83-
#On recule pour le prochain
83+
#On recule pour le prochains
8484
if(not self.final):
8585
self.barriere.nicole_oouuuuuvre()
8686
stop[0]=stop[0]-150*np.cos(ang)
8787
stop[1]=stop[1]-150*np.sin(ang)
88-
self.wb.goto(stop[0],stop[1],theta=ang+np.pi)
88+
self.wb.goto_stop(stop[0],stop[1],theta=ang+np.pi)
8989
else:
9090
stop[0]=stop[0]-50*np.cos(ang)
9191
stop[1]=stop[1]-50*np.sin(ang)
92-
self.wb.goto(stop[0],stop[1],theta=ang)
92+
self.wb.goto_stop(stop[0],stop[1],theta=ang)
9393
self.barriere.nicole_oouuuuuvre()
9494

9595

0 commit comments

Comments
 (0)