Files
kick-it/scripts/move_robot.py
Pavel Lutskov 5bd50de06e From now on use NaoMover from motion.py
Also use `read_config` from `utils.py`
2018-06-03 16:12:58 +02:00

20 lines
534 B
Python

from motion import NaoMover
from utils import read_config
if __name__ == "__main__":
cfg = read_config()
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)')