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

[Bug Report] Adding call for CV2 imshow will freeze entire Isaac-Sim #808

Open
1 of 4 tasks
ahanjaya opened this issue Aug 9, 2024 · 2 comments
Open
1 of 4 tasks

Comments

@ahanjaya
Copy link

ahanjaya commented Aug 9, 2024

Describe the bug

The bug is about calling the OpenCV window to render the camera image from the robot. The entire simulation will stuck on startup.

Steps to reproduce

def _debug_vis_callback(self, event):
     cv2.imshow("Robot Depth Frame", self.grid_depth_img)
     cv2.waitKey(1)

Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.
2024-08-09-112134_1278x1417_scrot

System Info

Describe the characteristics of your environment:

  • Commit: 6451d23
  • Isaac Sim Version: 4.0.0-rc.21 4.0.13872.3e3cb0c9.gl
  • OS: Ubuntu 22.04
  • GPU: RTX 4090
  • CUDA: 12.3
  • GPU Driver: 545.23.08

Additional context

Previously this bug never occurred, I could easily stream the OpenCV result with the same code
GetImage

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have checked that the issue is not in running Isaac Sim itself and is related to the repo

Acceptance Criteria

Add the criteria for which this task is considered done. If not known at issue creation time, you can add this once the issue is assigned.

  • Criteria 1
  • Criteria 2
@jsmith-bdai
Copy link
Collaborator

I'm not super familiar with cv2, but I think you can remove the cv2.waitKey(1) call to avoid blocking the simulation environment.

Let us know if this works for your issue!

@ahanjaya
Copy link
Author

it still doesn't work, even by simply initializing the OpenCV window

def _set_debug_vis_impl(self, debug_vis: bool):
    if self.cfg.show_depth:
        cv2.namedWindow("Robot Depth Frame", cv2.WINDOW_NORMAL)

I did this before and had no problem the last 2 weeks, but after I rebased to the latest main branch this issue occured.

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