Closed yilin404 closed 2 days ago
Unfortunately we have some issue with opencv. We included this in our tutorial:
For Linux only (not Mac), install extra dependencies for recording datasets:
conda install -y -c conda-forge ffmpeg
pip uninstall -y opencv-python
conda install -y -c conda-forge "opencv>=4.10.0"
@Cadene Thank you so much for the solution! It worked perfectly and successfully resolved my issue. I can now use cv2.imshow for visualization without any problems. 🎉
Your method is clear, effective, and incredibly helpful. I believe adding this solution to the project's README would be beneficial for other users who might face similar issues. It would make it easier for everyone to find and apply the fix. Thanks again for your support and assistance! 🙏
@yilin404 please could you open a PR when you thing these lines of code would be best in the README? thanks!
System Info
Information
Reproduction
I appreciate your hard work on this project, and I hope to contribute by sharing an issue I've encountered. I encountered an issue where after importing modules from the lerobot library, the program hangs when calling cv2.imshow. The program doesn't proceed to execute subsequent code. Specifically, the program seems to stop responding during executing cv2.imshow and does not display any image.
import rospy
import cv2 import numpy as np import einops import torch
import time
from lerobot.common.policies.diffusion.modeling_diffusion import DiffusionPolicy
from lib.arm_driver_wrapper import ArmDriverWrapper, ArmDriverWrapperCfg
from lib.realsense_wrapper import RealSenseWrapper, RealSenseWrapperCfg
def main(): rospy.init_node("Eval_Lerobot_node", anonymous=True) rospy.loginfo("==> Start Eval Lerobot node...")
if name == "main": main()
import pyrealsense2 as rs
import numpy as np import open3d as o3d import time
from dataclasses import dataclass from typing import List
@dataclass class RealSenseWrapperCfg: names: List[str] sns: List[str]
class RealSenseWrapper: def init(self, cfg: RealSenseWrapperCfg): super().init()