-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
from avp_stream import VisionProStreamer
import time
avp_ip = "192.168.8.145" # Vision Pro IP (shown in the app)
s = VisionProStreamer(ip=avp_ip)
# Configure video streaming from robot camera
# "/dev/video6" is the color camera on the head
s.configure_video(device="/dev/video6", format="v4l2", size="640x400", fps=30)
s.start_webrtc()
while True:
r = s.get_latest()
# Use tracking data to control your robot
head_pose = r['head']
# right_wrist = r['right_wrist']
# right_fingers = r['right_fingers']
print(head_pose)
time.sleep(1.0)when I tried to run this python file, the first time it works, but after that I press "ctrl-c" to cancel, and run it again, it shows as below
(base) pangu@pangu-Default-string:~/pangu/src/arm_teleop$ /bin/python3 /home/pangu/pangu/src/arm_teleop/vptele/core/vp_test.py
WARNING: No data received yet. Is the VisionOS app running?
== DATA IS FLOWING IN! ==
[WEBRTC] Starting server on 192.168.8.52:9999
[WEBRTC] Sending server info via gRPC...
[WEBRTC] Server listening on 0.0.0.0:9999
[WEBRTC] VisionOS client connected from ('192.168.8.145', 49192)
[video4linux2,v4l2 @ 0x7f30bc07b140] Dequeued v4l2 buffer contains corrupted data (0 bytes).
[WEBRTC] Server ready at 192.168.8.52:9999
[WEBRTC] VisionOS can query http://192.168.8.52:8888/webrtc_info to get connection details
[[[ 9.99453962e-01 -2.05463381e-03 -3.29799615e-02 -1.03579299e-03]
[-1.43442012e-03 9.94426489e-01 -1.05422720e-01 -1.05506973e-03]
[ 3.30127515e-02 1.05412446e-01 9.93880451e-01 1.19388723e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]]]
[WEBRTC] Connection established!
[WEBRTC] ICE state (('192.168.8.145', 49192)): checking
[WEBRTC] ICE state (('192.168.8.145', 49192)): completed
[video4linux2,v4l2 @ 0x7f30bc07b140] Dequeued v4l2 buffer contains corrupted data (0 bytes).
[[[ 0.99809825 -0.03773115 -0.04874846 -0.00954426]
[ 0.03335197 0.99558699 -0.08771793 -0.00476144]
[ 0.05184301 0.08592521 0.99495178 1.19367456]
[ 0. 0. 0. 1. ]]]
[[[ 0.9988659 -0.03176108 -0.03547625 -0.00635029]
[ 0.02860677 0.99587303 -0.08613331 -0.00256079]
[ 0.03806552 0.08502073 0.9956519 1.19341362]
[ 0. 0. 0. 1. ]]]and the apple vision pro tracking app shows that "Connected (Negotiating)" and didn't show any camera streaming on it. If I restart my computer, it works again but only the first time again
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels