meshrender icon indicating copy to clipboard operation
meshrender copied to clipboard

ValueError: Meshrender requires OpenGL 3+!

Open lsymuyu opened this issue 6 years ago • 7 comments

Hi After installing meshreder, I got the following warning when run my code.

-- End pasted text --

WARNING:root:Failed to import geometry msgs in rigid_transformations.py. WARNING:root:Failed to import ros dependencies in rigid_transforms.py WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable Unable to import DataStreamSyncer and Recorder! Likely due to missing multiprocess WARNING:root:autolab_perception is not installed as a catkin package - ROS msg conversions will not be available for image wrappers WARNING:root:autolab_perception is not installed as a catkin package - ROS msg conversions will not be available for image wrappers WARNING:root:autolab_perception is not installed as a catkin package - ROS msg conversions will not be available for image wrappers WARNING:root:Unable to import pylibfreenect2. Python-only Kinect driver may not work properly. WARNING:root:Failed to import ROS in Kinect2_sensor.py. Kinect will not be able to be used in bridged mode WARNING:root:Unable to import openni2 driver. Python-only Primesense driver may not work properly WARNING:root:Failed to import ROS in primesense_sensor.py. ROS functionality not available WARNING:root:primesense_sensor.py not installed as catkin package. ROS functionality not available. WARNING:root:Failed to import ROS in ensenso_sensor.py. ROS functionality not available WARNING:root:Failed to import ROS in phoxi_sensor.py. PhoXiSensor functionality unavailable. WARNING:root:Unable to import weight sensor modules!

When I try to render my scence, I got the error...Actually I already installed OpenGL. Thanks for your help. 97 # Render raw numpy arrays containing color and depth ---> 98 color_image_raw, depth_image_raw = scene.render(render_color=True) 99 100 # Alternatively, just render a depth image

C:\Users\liu\Anaconda3\lib\site-packages\meshrender\scene.py in render(self, render_color, front_and_back) 209 raise ValueError('scene.camera must be set before calling render()') 210 if self._renderer is None: --> 211 self._renderer = OpenGLRenderer(self) 212 return self._renderer.render(render_color, front_and_back=front_and_back) 213

C:\Users\liu\Anaconda3\lib\site-packages\meshrender\render.py in init(self, scene) 52 self._window = pyglet.window.Window(config=conf, visible=False, resizable=False, width=1, height=1) 53 except: ---> 54 raise ValueError('Meshrender requires OpenGL 3+!') 55 56 # Bind the frame buffer for offscreen rendering

ValueError: Meshrender requires OpenGL 3+!

Shouyang

lsymuyu avatar Sep 06 '18 10:09 lsymuyu

Are you trying to run this over SSH?

mmatl avatar Sep 06 '18 19:09 mmatl

Thanks for your reply. I am working with Windows, running my code in Spyder. What's the possible reason? Shouyang

lsymuyu avatar Sep 06 '18 22:09 lsymuyu

That error happens when Meshrender is unable to create an OpenGL context. This is usually caused when pyglet either (A) doesn't have access to a display, or (B) can't initialize an OpenGL > 3.0 context. Without further information, it's unclear what the issue is. Try replacing line 54 (raise ValueError...) with something that just re-raises the actual exception and let me know what it says.

mmatl avatar Sep 07 '18 20:09 mmatl

Are you trying to run this over SSH?

Hi, what if I want to use Meshrender on a server without any display?

gdwei avatar Jan 07 '19 09:01 gdwei

@gdwei Check out https://github.com/mmatl/pyrender. You'll need to install OSMesa (check out the docs website) but you can do it without a display now. I'd move to that repo as it's better and will be supported by me in the future.

mmatl avatar Jan 24 '19 04:01 mmatl

Hi! Yes, the new code at Pyrender supports offscreen rendering on a headless machine. Check out instructions for getting it working here: https://pyrender.readthedocs.io/en/latest/install/install.html#getting-pyrender-working-with-osmesa

On Mon, Feb 11, 2019 at 12:58 PM ChenXuelinCXL [email protected] wrote:

@gdwei https://github.com/gdwei Check out https://github.com/mmatl/pyrender. You'll need to install OSMesa (check out the docs website) but you can do it without a display now. I'd move to that repo as it's better and will be supported by me in the future.

Hi @mmatl https://github.com/mmatl , how about the headless server rendering stuff, is the latest code support that? Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BerkeleyAutomation/meshrender/issues/8#issuecomment-462491522, or mute the thread https://github.com/notifications/unsubscribe-auth/AGNyRkH-hfHD4vOJmBTeWFgN4ABP53_jks5vMdlpgaJpZM4WcnYW .

mmatl avatar Feb 12 '19 06:02 mmatl

@mmatl Thanks!

gdwei avatar Mar 13 '19 04:03 gdwei