Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imshow not working #700

Closed
carolineys opened this issue Feb 9, 2025 · 2 comments
Closed

imshow not working #700

carolineys opened this issue Feb 9, 2025 · 2 comments

Comments

@carolineys
Copy link

When I ran python lerobot/scripts/control_robot.py --robot.type=koch --control.type=teleoperate, the program hangs at (also no image display pop up) the imshow line in ./lerobot/common/robot_devices/control_utils.py

    if display_cameras and not is_headless():
        image_keys = [key for key in observation if "image" in key]
        for key in image_keys:
            cv2.imshow(key, cv2.cvtColor(observation[key].numpy(), cv2.COLOR_RGB2BGR))
        cv2.waitKey(1)

I am using ubuntu 22 and have opencv-python==4.10.0.84 installed.

@liyitenga
Copy link

Have you tried executing this command?

pip uninstall -y opencv-python
conda install -y -c conda-forge "opencv>=4.10.0"

@carolineys
Copy link
Author

I just figured it out. I originally used a Python virtual environment, and when I reinstalled everything with conda, it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants