This commit is contained in:
Jaco Cronje 2025-04-15 18:08:29 +08:00 committed by GitHub
commit c31713079a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -134,6 +134,13 @@ python lerobot/scripts/control_robot.py \
``` ```
""" """
import cv2
# Make sure that the UI gets initialized before PyAV (av) gets imported by torchvision
# This solves the hanging issue with cv2.imshow on Ubuntu
cv2.namedWindow("i")
cv2.destroyAllWindows()
import logging import logging
import os import os
import time import time

View File

@ -88,6 +88,12 @@ import time
from pathlib import Path from pathlib import Path
import cv2 import cv2
# Make sure that the UI gets initialized before PyAV (av) gets imported by torchvision
# This solves the hanging issue with cv2.imshow on Ubuntu
cv2.namedWindow("i")
cv2.destroyAllWindows()
import gymnasium as gym import gymnasium as gym
import numpy as np import numpy as np
import torch import torch