Skip to content

mujoco.FatalError: Default framebuffer is not complete, error 0x0 #269

@JakobThumm

Description

@JakobThumm

When trying to train a diffusion policy

python train.py --config ../exps/templates/diffusion_policy.json --dataset ../../data/lift/ph/low_dim_v15.hdf5

I get the following error:

Traceback (most recent call last):
  File "/home/jakob/Promotion/code/robomimic/robomimic/scripts/train.py", line 504, in main
    train(config, device=device, resume=args.resume)
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jakob/Promotion/code/robomimic/robomimic/scripts/train.py", line 368, in train
    all_rollout_logs, video_paths = TrainUtils.rollout_with_stats(
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        policy=rollout_model,
        ^^^^^^^^^^^^^^^^^^^^^
    ...<8 lines>...
        terminate_on_success=config.experiment.rollout.terminate_on_success,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/jakob/Promotion/code/robomimic/robomimic/utils/train_utils.py", line 482, in rollout_with_stats
    rollout_info = run_rollout(
        policy=policy,
    ...<6 lines>...
        terminate_on_success=terminate_on_success,
    )
  File "/home/jakob/Promotion/code/robomimic/robomimic/utils/train_utils.py", line 357, in run_rollout
    frame = env.render(mode="rgb_array", height=512, width=512)
  File "/home/jakob/Promotion/code/robomimic/robomimic/envs/wrappers.py", line 86, in hooked
    result = orig_attr(*args, **kwargs)
  File "/home/jakob/Promotion/code/robomimic/robomimic/envs/env_robosuite.py", line 233, in render
    im = self.env.sim.render(height=height, width=width, camera_name=camera_name)
  File "/home/jakob/anaconda3/envs/hrgym/lib/python3.13/site-packages/robosuite/utils/binding_utils.py", line 1138, in render
    self._render_context_offscreen.render(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        width=width, height=height, camera_id=camera_id, segmentation=segmentation
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/jakob/anaconda3/envs/hrgym/lib/python3.13/site-packages/robosuite/utils/binding_utils.py", line 137, in render
    self.update_offscreen_size(new_width, new_height)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jakob/anaconda3/envs/hrgym/lib/python3.13/site-packages/robosuite/utils/binding_utils.py", line 125, in update_offscreen_size
    self._set_mujoco_context_and_buffers()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/jakob/anaconda3/envs/hrgym/lib/python3.13/site-packages/robosuite/utils/binding_utils.py", line 116, in _set_mujoco_context_and_buffers
    self.con = mujoco.MjrContext(self.model._model, mujoco.mjtFontScale.mjFONTSCALE_150)
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mujoco.FatalError: Default framebuffer is not complete, error 0x0

I can circumvent that error by disabling the rollouts in the config

"rollout": {
    "enabled": false,
    "n": 50,
    "horizon": 400,
    "rate": 50,
    "warmstart": 0,
    "terminate_on_success": true
},

But it would be great to have the episode validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions