Skip to content

Commit

Permalink
Added arguments to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tayalmanan28 authored Jun 19, 2022
1 parent 1e8672d commit 5d38d82
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import numpy as np
from robot import Biped
from walking import PreviewControl
import argparse


def stand():
Expand Down Expand Up @@ -149,6 +150,21 @@ def walk():


if __name__ == '__main__':
#walk()
#jump(withTorsoTwist=False)
squat()
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--action', help='Choose from walk, stand, squat, jump_w_Twist, jump_wo_Twist, torsoTwist', type=str, default='walk')
args = parser.parse_args()

#---------------------------------------------------------------------------------------------------------------------------------

if (args.action == walk):
walk()
elif (args.action == jump_w_Twist):
jump(withTorsoTwist=True)
elif (args.action == jump_wo_Twist):
jump(withTorsoTwist=False)
elif (args.action == squat):
squat()
elif (args.action == torsoTwist):
torsoTwist()
else:
stand()

0 comments on commit 5d38d82

Please sign in to comment.