-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_gpu.py
More file actions
30 lines (25 loc) · 1001 Bytes
/
Copy pathrun_gpu.py
File metadata and controls
30 lines (25 loc) · 1001 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
#!/usr/bin/env python3
import argparse
import asyncio
def main():
parser = argparse.ArgumentParser(description="RoboGesture 英文实机对话链路")
parser.add_argument("--execute", action="store_true")
parser.add_argument("--preflight", action="store_true")
parser.add_argument("--listen-seconds", type=float, default=120.0)
parser.add_argument("--confirm")
args = parser.parse_args()
if not args.execute:
print("未加 --execute;没有连接麦克风、模型或机器人。")
return
if not args.preflight:
answer = args.confirm
if answer is None:
answer = input(
"确认现场看护、周围净空且急停在手;输入 SEND_MOTION:"
).strip()
if answer != "SEND_MOTION":
raise SystemExit("确认词不匹配;没有启动。")
from robogesture.app import run
asyncio.run(run(args.listen_seconds, args.preflight))
if __name__ == "__main__":
main()