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

Commit

Permalink
modif avec goto et finalangle
Browse files Browse the repository at this point in the history
  • Loading branch information
LeProblemeEDMN committed Jun 1, 2024
1 parent 4f6bc87 commit e036e22
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions raspberrypi/robots/team2024/PanneauxSolaires.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def procedure(self):
self.barriere.ferme_gauche()
############################################ Avance
pos =self.wb.get_position()
self.wb.goto(pos[0],pos[1],theta=ang_approche)
self.wb.goto(fin[0],fin[1],theta=ang_approche, linvelmax=POSITIONCONTROL_LINVELMAX_VALUE*0.2)
self.wb.goto_stop(pos[0],pos[1],theta=ang_approche)
self.wb.goto_stop(fin[0],fin[1],theta=ang_approche, linvelmax=POSITIONCONTROL_LINVELMAX_VALUE*0.2)

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

Expand Down
14 changes: 7 additions & 7 deletions raspberrypi/robots/team2024/RecupPlante.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ def procedure(self):
print(length-self.radiusRobot)
#print(self.wb.wheeledbase.getuuid())
if(length-self.radiusRobot>0):
self.wb.goto(stop[0],stop[1],theta=ang)
self.wb.goto_stop(stop[0],stop[1],theta=ang)

######On prends
self.barriere.nicole_oouuuuuvre()

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

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

Expand All @@ -77,19 +77,19 @@ def procedure(self):
print(theta)
print(ang)

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

#On recule pour le prochain
#On recule pour le prochains
if(not self.final):
self.barriere.nicole_oouuuuuvre()
stop[0]=stop[0]-150*np.cos(ang)
stop[1]=stop[1]-150*np.sin(ang)
self.wb.goto(stop[0],stop[1],theta=ang+np.pi)
self.wb.goto_stop(stop[0],stop[1],theta=ang+np.pi)
else:
stop[0]=stop[0]-50*np.cos(ang)
stop[1]=stop[1]-50*np.sin(ang)
self.wb.goto(stop[0],stop[1],theta=ang)
self.wb.goto_stop(stop[0],stop[1],theta=ang)
self.barriere.nicole_oouuuuuvre()


Expand Down

0 comments on commit e036e22

Please sign in to comment.