-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtest_exoskeleton.py
More file actions
39 lines (30 loc) · 806 Bytes
/
Copy pathtest_exoskeleton.py
File metadata and controls
39 lines (30 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import time
import logging
import argparse
from exoskeleton.teleop import DualArmTeleOperator
parser = argparse.ArgumentParser()
parser.add_argument(
'--task', '-t',
default = 'gather_balls',
help = 'task name',
type = str,
choices = ['gather_balls', 'grasp_from_the_curtained_shelf']
)
args = parser.parse_args()
op = DualArmTeleOperator(
'exoskeleton/configs/flexiv_left_' + str(args.task) + '.json', 'exoskeleton/configs/flexiv_right_' + str(args.task) + '.json'
)
logger = logging.getLogger("TeleOP-left")
logger.setLevel(logging.INFO)
logger = logging.getLogger("TeleOP-right")
logger.setLevel(logging.INFO)
op.initialization()
time.sleep(10)
op.calibration()
time.sleep(5)
try:
op.start()
while True:
time.sleep(1)
except Exception:
op.stop()