cistine's picture
Upload 490 files
b98ffbb verified
raw
history blame contribute delete
680 Bytes
from robomaster import camera,robot
import time
import robomaster
import cv2
CONN = "ap"
ep_robot = robot.Robot()
print("Initializing robot...", flush=True)
ep_robot.initialize(conn_type=CONN)
# ep_robot.camera.start_video_stream(display=False)
ep_camera = ep_robot.camera
# ep_camera.start_video_stream(display=False)
ep_camera.start_video_stream(display=True, resolution=camera.STREAM_360P)
time.sleep(1000)
# ep_camera.
print(ep_robot.get_sn)
print(ep_robot.camera.video_stream_addr)
CAMERA_WIDTH = 960
CAMERA_HEIGHT = 540
STREAM_URL = "tcp://192.168.2.1:40921"
cap = cv2.VideoCapture(STREAM_URL)
print(cap.isOpened())
cap.release()
ep_robot.camera.stop_video_stream()