Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2012-10-18 04:47:16 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2012-10-18 04:47:16 (GMT)
commit55f4cd910c9013d490dbe0377e7aa446d03ae283 (patch)
tree5dcfaceedfd02badaf9b6df4e23ed7f71a85b305
parentbf90188aa6b9d309d40cde736db2f81df68856e6 (diff)
fix path in robot.py
-rwxr-xr-xrobot.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/robot.py b/robot.py
index 2a33f97..adf8536 100755
--- a/robot.py
+++ b/robot.py
@@ -37,7 +37,7 @@ class Robot(object):
def __init__(self, tamanioc):
self.z1 = tamanioc[0] / 15.0
self.z2 = tamanioc[1] / 3.0
- self.vel_anterior = (0, 0, 0, 0)
+ self.vel_actual = (0, 0, 0, 0)
self.butia = None
self.bobot = None
self.bobot_launch()
@@ -51,7 +51,7 @@ class Robot(object):
else:
try:
print 'creating bobot'
- self.bobot = subprocess.Popen(['./lua', 'bobot-server.lua'], cwd='./lib/butia_support')
+ self.bobot = subprocess.Popen(['./lua', 'bobot-server.lua'], cwd='./lib/support')
except:
print 'ERROR creating bobot'
@@ -70,8 +70,6 @@ class Robot(object):
x,y = pos
- vel_actual = (0, 0, 0, 0)
-
if (x >= 0) and (x <= (2*self.z1)):
if (y >= 0) and (y <= self.z2) :
vel_actual = (1, 900, 1, 600)
@@ -133,9 +131,6 @@ class Robot(object):
vel_actual = (0, 600, 0, 900)
- # para evitar envios de velocidad innecesarios al robot
- if not(vel_actual == self.vel_anterior):
- self.vel_anterior = vel_actual
- self.butia.set2MotorSpeed(str(vel_actual[0]), str(vel_actual[1]), str(vel_actual[2]), str(vel_actual[3]))
+ self.butia.set2MotorSpeed(str(vel_actual[0]), str(vel_actual[1]), str(vel_actual[2]), str(vel_actual[3]))