-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
hello world example doesnt produce video #93
Comments
Same problem while running |
@apandy02 are you running it with the @jtoy as a baseline, does the hello_genesis.py tutorial work for you? I had a similar issue trying to add a new camera to the scene, so it's hard to tell if that's your issue or something more fundamental. |
I got the elastic_dragon example working,I modified it to add a camera and get video, so I think the hello world example is not fully working properly. import argparse import numpy as np import genesis as gs def main():
if name == "main": |
I still get this error with your working sample on M1 Max
|
@vinny-888 , I am also having OpenGL error issues and filed a new issue for this: #165 |
@RobRoyce Turning on vis led to OpenGL errors, which were resolved by switching from uv to conda for package management. Would be interested in understanding why, but for now I'm all set! |
import genesis as gs
gs.init(backend=gs.gpu)
scene = gs.Scene(
show_viewer = True,
viewer_options = gs.options.ViewerOptions(
res = (1280, 960),
camera_pos = (3.5, 0.0, 2.5),
camera_lookat = (0.0, 0.0, 0.5),
camera_fov = 40,
max_FPS = 60,
),
vis_options = gs.options.VisOptions(
show_world_frame = True,
world_frame_size = 1.0,
show_link_frame = False,
show_cameras = False,
plane_reflection = True,
ambient_light = (0.1, 0.1, 0.1),
),
renderer=gs.renderers.Rasterizer(),
)
plane = scene.add_entity(
gs.morphs.Plane(),
)
franka = scene.add_entity(
gs.morphs.MJCF(file='xml/franka_emika_panda/panda.xml'),
)
cam = scene.add_camera(
res = (640, 480),
pos = (3.5, 0.0, 2.5),
lookat = (0, 0, 0.5),
fov = 30,
GUI = False,
)
scene.build()
render rgb, depth, segmentation, and normal
rgb, depth, segmentation, normal = cam.render(rgb=True, depth=True, segmentation=True, normal=True)
cam.start_recording()
import numpy as np
for i in range(120):
scene.step()
cam.set_pose(
pos = (3.0 * np.sin(i / 60), 3.0 * np.cos(i / 60), 2.5),
lookat = (0, 0, 0.5),
)
cam.render()
cam.stop_recording(save_to_filename='video.mp4', fps=30)
it just seems to sit there:
[Genesis] [11:36:48] [INFO] ╭─────────────────────────────────────────────────────────────────────────────────────╮
[Genesis] [11:36:48] [INFO] │┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉ Genesis ┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉│
[Genesis] [11:36:48] [INFO] ╰─────────────────────────────────────────────────────────────────────────────────────╯
[Genesis] [11:36:49] [INFO] Running on [Apple M1 Max] with backend gs.metal. Device memory: 32.00 GB.
[Genesis] [11:36:49] [INFO] 🚀 Genesis initialized. 🔖 version: 0.2.0, 🌱 seed: None, 📏 precision: '32', 🐛 debug: False, 🎨 theme: 'dark'.
[Genesis] [11:36:49] [INFO] Scene <69300f1> created.
[Genesis] [11:36:49] [INFO] Adding <gs.RigidEntity>. idx: 0, uid: <7cfebb9>, morph: <gs.morphs.Plane>, material: <gs.materials.Rigid>.
[Genesis] [11:36:49] [INFO] Adding <gs.RigidEntity>. idx: 1, uid: <3a76479>, morph: <gs.morphs.MJCF(file='/Users/jtoy/.asdf/installs/python/3.10.4/lib/python3.10/site-packages/genesis/assets/xml/franka_emika_panda/panda.xml')>, material: <gs.materials.Rigid>.
[Genesis] [11:36:50] [INFO] Building scene <69300f1>...
[Genesis] [11:36:54] [INFO] Compiling simulation kernels...
[Genesis] [11:36:59] [INFO] Building visualizer...
[Genesis] [11:37:01] [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] [11:37:01] [INFO] Viewer created. Resolution: 1280×960, max_FPS: 60.
[Genesis] [11:37:01] [INFO] Running at 2824.03 FPS.
The text was updated successfully, but these errors were encountered: