diff --git a/pykick/kick.py b/pykick/kick.py index 8d09600..5b4c953 100644 --- a/pykick/kick.py +++ b/pykick/kick.py @@ -1,10 +1,23 @@ +import argparse + from .utils import read_config from .movements import NaoMover if __name__ == "__main__": + + parser = argparse.ArgumentParser( + epilog='When called without arguments specifying the video source, ' + + 'will try to use the webcam' + ) + parser.add_argument( + '-f', '--foot', + default='L', + choices=['R', 'L'] + ) + args = parser.parse_args() + cfg = read_config() mover = NaoMover(cfg['ip']) mover.stand_up() - mover.kick(foot="R") - mover.stand_up() + mover.kick(foot=args.foot) diff --git a/pykick/movements.py b/pykick/movements.py index 7f86475..810be43 100644 --- a/pykick/movements.py +++ b/pykick/movements.py @@ -22,7 +22,7 @@ class NaoMover(object): [[(1, 0, 'HipPitch', -45, 0.08), (1, 0, 'KneePitch', 10, 0.20), (1, 0, 'AnklePitch', 20, 0.16)], - 10] + 4] ] def __init__(self, nao_ip, nao_port=9559):