Custom GLContext python ? #1990
Unanswered
GCrequer
asked this question in
Asking for Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I'm a student in robotics and computer vision, and I'm trying to get into MuJoCo. I have some knowledge of OpenGL, enough to understand the basics, but not enough to be fully independent with all the subtleties.
My goal is to simulate cameras with strong distortions (fisheye, 360°, etc.) embedded on robots. To do this, I need to bypass MuJoCo's default OpenGL context. I've read that it's entirely possible to do so here and I've found the class template for it in the
__init__.py
files (for now, I'm just trying with mujoco.GLContext as it's integrated).However, it's mentioned that once the context is created, the classic
mjr_
functions should work. So, I don't know where my mistake is in the following simplified code:I prefer to use my own context because making changes to
mjrContext
is not recommended here,and I believe that "everything" is possible with our own context, and that it's through thisGLContext
class that we can create it. I know that theses classes are only intended for offscreen rendering (#544), I will have to postprocess my frames so it is not a problem.If you have any hints to give me, or an alternative to suggest (knowing that I'm already struggling to understand how to modify shaders and retrieve vertices in this system), it would be great to know !
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions