Genesis
Genesis copied to clipboard
OpenGL.error.GLError: GLError(err = 1282, description = b'invalid operation', baseOperation = glBindFramebuffer, cArguments = (GL_DRAW_FRAMEBUFFER, 0) )
Device: Apple MacBook Pro Processor: M1 Pro RAM: 16GB Python: 3.10.16
Running this code:
import argparse
import genesis as gs
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-v", "--vis", action="store_true", default=False)
args = parser.parse_args()
########################## init ##########################
gs.init(backend=gs.cpu)
########################## create a scene ##########################
scene = gs.Scene(
sim_options=gs.options.SimOptions(),
viewer_options=gs.options.ViewerOptions(
camera_pos=(3.5, 0.0, 2.5),
camera_lookat=(0.0, 0.0, 0.5),
camera_fov=40,
),
show_viewer=args.vis,
rigid_options=gs.options.RigidOptions(
dt=0.01,
gravity=(0.0, 0.0, -10.0),
),
)
########################## entities ##########################
plane = scene.add_entity(gs.morphs.Plane())
r0 = scene.add_entity(
gs.morphs.MJCF(file="xml/franka_emika_panda/panda.xml"),
)
########################## build ##########################
scene.build()
gs.tools.run_in_another_thread(fn=run_sim, args=(scene, args.vis))
if args.vis:
scene.viewer.start()
def run_sim(scene, enable_vis):
from time import time
t_prev = time()
i = 0
while True:
i += 1
scene.step()
t_now = time()
print(1 / (t_now - t_prev), "FPS")
t_prev = t_now
if i > 200:
break
if enable_vis:
scene.viewer.stop()
if __name__ == "__main__":
main()
Gives this error:
(venv) genesis-tests $ python render_on_macos.py -v
objc[15853]: Class GLFWHelper is implemented in both /Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/taichi/_lib/core/taichi_python.cpython-310-darwin.so (0x153e00570) and /Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/pygel3d/libPyGEL.dylib (0x318b5d7c0). One of the two will be used. Which one is undefined.
objc[15853]: Class GLFWApplicationDelegate is implemented in both /Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/taichi/_lib/core/taichi_python.cpython-310-darwin.so (0x153e005c0) and /Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/pygel3d/libPyGEL.dylib (0x318b5d810). One of the two will be used. Which one is undefined.
objc[15853]: Class GLFWWindowDelegate is implemented in both /Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/taichi/_lib/core/taichi_python.cpython-310-darwin.so (0x153e005e8) and /Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/pygel3d/libPyGEL.dylib (0x318b5d838). One of the two will be used. Which one is undefined.
objc[15853]: Class GLFWContentView is implemented in both /Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/taichi/_lib/core/taichi_python.cpython-310-darwin.so (0x153e00638) and /Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/pygel3d/libPyGEL.dylib (0x318b5d888). One of the two will be used. Which one is undefined.
objc[15853]: Class GLFWWindow is implemented in both /Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/taichi/_lib/core/taichi_python.cpython-310-darwin.so (0x153e006b0) and /Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/pygel3d/libPyGEL.dylib (0x318b5d900). One of the two will be used. Which one is undefined.
[Genesis] [07:29:41] [INFO] ╭───────────────────────────────────────────────────╮
[Genesis] [07:29:41] [INFO] │┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈ Genesis ┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈│
[Genesis] [07:29:41] [INFO] ╰───────────────────────────────────────────────────╯
[Genesis] [07:29:41] [INFO] Running on [Apple M1 Pro] with backend gs.cpu. Device memory: 16.00 GB.
[Genesis] [07:29:41] [INFO] 🚀 Genesis initialized. 🔖 version: 0.2.0, 🌱 seed: None, 📏 precision: '32', 🐛 debug: False, 🎨 theme: 'dark'.
[Genesis] [07:29:41] [INFO] Scene <b7b3450> created.
[Genesis] [07:29:41] [INFO] Adding <gs.RigidEntity>. idx: 0, uid: <f805cf5>, morph: <gs.morphs.Plane>, material: <gs.materials.Rigid>.
[Genesis] [07:29:41] [INFO] Adding <gs.RigidEntity>. idx: 1, uid: <8e1952d>, morph: <gs.morphs.MJCF(file='/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/genesis/assets/xml/franka_emika_panda/panda.xml')>, material: <gs.materials.Rigid>.
[Genesis] [07:29:42] [INFO] Building scene <b7b3450>...
[Genesis] [07:29:45] [INFO] Compiling simulation kernels...
[Genesis] [07:29:50] [INFO] Building visualizer...
[Genesis] [07:29:51] [WARNING] Non-linux system detected. In order to use the interactive viewer, you need to manually run simulation in a separate thread and then start viewer. See `examples/render_on_macos.py`.
[Genesis] [07:29:51] [INFO] Viewer created. Resolution: 644×483, max_FPS: 60.
[Genesis] [07:29:51] [INFO] Running at 4403.59 FPS.
212.07989078222178 FPS
[Genesis] [07:29:51] [INFO] Running at 817.58 FPS.
49.25956287361856 FPS
[Genesis] [07:29:51] [INFO] Running at 458.47 FPS.
48.77040964639946 FPS
[Genesis] [07:29:51] [INFO] Running at 134.71 FPS.
9.257559571631631 FPS
[Genesis] [07:29:51] [INFO] Running at 124.58 FPS.
50.796948044083805 FPS
[Genesis] [07:29:51] [INFO] Running at 115.89 FPS.
49.56927258760267 FPS
[Genesis] [07:29:51] [INFO] Running at 108.51 FPS.
48.815819182737634 FPS
2024-12-19 07:29:51.457 Python[15853:4047441] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/2q/0h01c5_n6_1g4xw0phb_c_3r0000gn/T/org.python.python.savedState
[Genesis] [07:29:51] [INFO] Running at 102.29 FPS.
48.57667006393032 FPS
[Genesis] [07:29:51] [INFO] Running at 97.05 FPS.
48.85676012533634 FPS
[Genesis] [07:29:51] [INFO] Running at 90.32 FPS.
31.28326682826776 FPS
uniform not found: V
uniform not found: P
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: V
uniform not found: P
uniform not found: M
uniform not found: V
uniform not found: P
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: M
uniform not found: ambient_light
uniform not found: directional_lights[0].color
uniform not found: directional_lights[0].direction
uniform not found: directional_lights[0].intensity
uniform not found: directional_lights[0].shadow_map
uniform not found: directional_lights[0].light_matrix
uniform not found: n_directional_lights
uniform not found: n_spot_lights
uniform not found: n_point_lights
uniform not found: point_lights[0].shadow_map
uniform not found: point_lights[1].shadow_map
uniform not found: point_lights[2].shadow_map
uniform not found: point_lights[3].shadow_map
uniform not found: cam_pos
uniform not found: reflection_mat
uniform not found: V
uniform not found: P
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: ambient_light
uniform not found: directional_lights[0].color
uniform not found: directional_lights[0].direction
uniform not found: directional_lights[0].intensity
uniform not found: directional_lights[0].shadow_map
uniform not found: directional_lights[0].light_matrix
uniform not found: n_directional_lights
uniform not found: n_spot_lights
uniform not found: n_point_lights
uniform not found: point_lights[0].shadow_map
uniform not found: point_lights[1].shadow_map
uniform not found: point_lights[2].shadow_map
uniform not found: point_lights[3].shadow_map
uniform not found: cam_pos
uniform not found: reflection_mat
uniform not found: V
uniform not found: P
uniform not found: M
uniform not found: material.base_color_texture
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: ambient_light
uniform not found: directional_lights[0].color
uniform not found: directional_lights[0].direction
uniform not found: directional_lights[0].intensity
uniform not found: directional_lights[0].shadow_map
uniform not found: directional_lights[0].light_matrix
uniform not found: n_directional_lights
uniform not found: n_spot_lights
uniform not found: n_point_lights
uniform not found: point_lights[0].shadow_map
uniform not found: point_lights[1].shadow_map
uniform not found: point_lights[2].shadow_map
uniform not found: point_lights[3].shadow_map
uniform not found: cam_pos
uniform not found: reflection_mat
uniform not found: V
uniform not found: P
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
uniform not found: M
uniform not found: material.base_color_factor
uniform not found: material.metallic_factor
uniform not found: material.roughness_factor
uniform not found: material.emissive_factor
Traceback (most recent call last):
File "/Users/sarmad/Documents/Code/Python/genesis-tests/render_on_macos.py", line 65, in <module>
main()
File "/Users/sarmad/Documents/Code/Python/genesis-tests/render_on_macos.py", line 41, in main
scene.viewer.start()
File "/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/genesis/vis/viewer.py", line 91, in start
self._pyrender_viewer.start()
File "/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/genesis/ext/pyrender/viewer.py", line 386, in start
self._init_and_start_app()
File "/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/genesis/ext/pyrender/viewer.py", line 1149, in _init_and_start_app
pyglet.clock.tick()
File "/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/pyglet/clock.py", line 528, in tick
return _default.tick(poll)
File "/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/pyglet/clock.py", line 270, in tick
self.call_scheduled_functions(delta_t)
File "/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/pyglet/clock.py", line 217, in call_scheduled_functions
item.func(now - item.last_ts, *item.args, **item.kwargs)
File "/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/genesis/ext/pyrender/viewer.py", line 941, in _time_event
self.on_draw()
File "/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/genesis/ext/pyrender/viewer.py", line 654, in on_draw
self._renderer.render_texts(
File "/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/genesis/ext/pyrender/renderer.py", line 258, in render_texts
self._configure_forward_pass_viewport(0)
File "/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/genesis/ext/pyrender/renderer.py", line 1160, in _configure_forward_pass_viewport
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0)
File "/Users/sarmad/Documents/Code/Python/genesis-tests/venv/lib/python3.10/site-packages/OpenGL/error.py", line 230, in glCheckError
raise self._errorClass(
OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glBindFramebuffer,
cArguments = (GL_DRAW_FRAMEBUFFER, 0)
)