Skip to content

Commit

Permalink
The last commit... #goRedDragons
Browse files Browse the repository at this point in the history
  • Loading branch information
João Carlos Tonon Campi authored and João Carlos Tonon Campi committed Oct 15, 2021
1 parent ea570aa commit 844abf8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions action.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,14 +583,14 @@ def slave(robotSlave, robotMaster, robot0=None, robotEnemy0=None, robotEnemy1=No
projY = robotMaster.yPos - 30
else:
projX = robotMaster.xPos + 15
projY = robotMaster.yPos - 30 #
projY = robotMaster.yPos - 15 #30
else:
if robotMaster.xPos > 75:
projX = robotMaster.xPos - 15
projY = robotMaster.yPos + 30
else:
projX = robotMaster.xPos + 15
projY = robotMaster.yPos + 30 #
projY = robotMaster.yPos + 15 #30

dist = sqrt((robotSlave.xPos - projX)**2 + (robotSlave.yPos - projY)**2)
robotSlave.target.update(projX,projY,0)
Expand Down
4 changes: 2 additions & 2 deletions behaviours.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ def __init__(self):
#? Constants learned from EP
self.d_e=6 # Constante relacionada ao tamanho das espirais
self.k_r=3 # Constante de suavização do campo
self.delta=5 # Variancia da gaussiana de obstaculo
self.delta=3.5#5 # Variancia da gaussiana de obstaculo
self.k_o=0.5 # Constante de proporcionalidade velocidade do obstaculo
self.d_min=5 #* => modified: EP = 3.48 # Distancia mínima em que o campo se torna puro repulsivo
self.d_min=3.5#5 #* => modified: EP = 3.48 # Distancia mínima em que o campo se torna puro repulsivo


def rotMatrix(self,alpha): # Função que retorna uma matriz de rotação
Expand Down
2 changes: 1 addition & 1 deletion simClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def __init__(self, index, actuator, mray):
self.vL=0 #? Left wheel velocity (cm/s) => updated on simClasses.py -> simSetVel()
self.vR=0 #? Right wheel velocity (cm/s) => updated on simClasses.py -> simSetVel()
if self.index == 0:
self.vMax=35 #! Robot max velocity (cm/s)
self.vMax=40#35 #! Robot max velocity (cm/s)
else:
self.vMax=50
self.rMax=3*self.vMax #! Robot max rotation velocity (rad*cm/s)
Expand Down

0 comments on commit 844abf8

Please sign in to comment.