This commit is contained in:
GZod01 2023-04-01 10:39:57 +02:00
parent dbda82b076
commit a4f6b73e45
4 changed files with 6 additions and 1 deletions

View file

@ -76,7 +76,7 @@ class MotorizedPlatform:
}) })
def southTranslation(self, speed): def southTranslation(self, speed):
self.northTranslation(-speed*1.1) self.northTranslation(-speed)
def northTranslation(self, speed): def northTranslation(self, speed):
self.setSpeed({ self.setSpeed({
@ -125,6 +125,8 @@ class MotorizedPlatform:
self.northWestTranslation(-speed) self.northWestTranslation(-speed)
def stop(self): def stop(self):
self.init()
"""
realescMapping = { realescMapping = {
'frontLeft': { 'frontLeft': {
'slot': 12, # 7 'slot': 12, # 7
@ -151,6 +153,7 @@ class MotorizedPlatform:
0, 0,
self.convert_speed_to_esc(0, realescMapping[esc_name]['range']) self.convert_speed_to_esc(0, realescMapping[esc_name]['range'])
) )
"""
def oldstop(self): def oldstop(self):
self.escMapping = { self.escMapping = {

Binary file not shown.

View file

@ -38,6 +38,7 @@ class commandHandler:
try: try:
return robot.translation(arg,self.speed) return robot.translation(arg,self.speed)
except Exception as e: except Exception as e:
print(e)
return 'error' return 'error'
def stop(self): def stop(self):
robot.stop() robot.stop()
@ -49,6 +50,7 @@ class commandHandler:
try: try:
robot.rotation(arg,self.speed) robot.rotation(arg,self.speed)
except Exception as e: except Exception as e:
print(e)
raise e raise e
def set_speed(self,v): def set_speed(self,v):
if v>=50: if v>=50: