More work on goal-ball alignment

This commit is contained in:
2018-06-23 20:50:28 +02:00
parent 73ca100c83
commit 67a8cccd51
5 changed files with 33 additions and 21 deletions

View File

@@ -7,13 +7,18 @@ if __name__ == "__main__":
mover = NaoMover(cfg['ip'], cfg['port'])
mover.stand_up()
while True:
axis = int(raw_input('Axis: '))
amount = float(raw_input('How much: '))
if axis == 0:
mover.move_to(amount, 0, 0)
elif axis == 1:
mover.move_to(0, amount, 0)
elif axis == 2:
mover.move_to(0, 0, amount)
else:
print('Axis out of range (0, 1, 2)')
mover.move_to(0, 0, 0.5 * amount)
mover.wait()
mover.move_to(0, -0.3 * amount, 0)
mover.wait()
mover.move_to(-0.1 * abs(amount), 0, 0)
# amount = float(raw_input('How much: '))
# if axis == 0:
# mover.move_to(amount, 0, 0)
# elif axis == 1:
# mover.move_to(0, amount, 0)
# elif axis == 2:
# mover.move_to(0, 0, amount)
# else:
# print('Axis out of range (0, 1, 2)')