MCPcopy Create free account
hub / github.com/Improbable-AI/VisionProTeleop / main

Function main

examples/06_stream_from_camera.py:7–32  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

5import time
6
7def main(args):
8 streamer = VisionProStreamer(ip=args.ip, record=True)
9
10 streamer.configure_video(
11 device="0:none",
12 format="avfoundation",
13 size="640x480",
14 fps=30,
15 )
16 streamer.start_webrtc(port=9999)
17
18 try:
19 # Keep the script running and show hand tracking data
20 while True:
21 latest = streamer.get_latest()
22
23 if latest:
24
25 pass
26 left_pos = latest["left_wrist"][0, :3, 3]
27 right_pos = latest["right_wrist"][0, :3, 3]
28
29 time.sleep(0.1)
30
31 except KeyboardInterrupt:
32 print("\n\n✓ Stopped streaming")
33
34if __name__ == "__main__":
35 import argparse

Callers 1

Calls 5

configure_videoMethod · 0.95
start_webrtcMethod · 0.95
get_latestMethod · 0.95
VisionProStreamerClass · 0.90
printFunction · 0.50

Tested by

no test coverage detected