Skip to content
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

GLFW Issue on Ubuntu 24.04 #2393

Open
2 tasks done
david-dorf opened this issue Jan 28, 2025 · 0 comments
Open
2 tasks done

GLFW Issue on Ubuntu 24.04 #2393

david-dorf opened this issue Jan 28, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@david-dorf
Copy link

Intro

Hi!

I am a robotics engineer at Triton Systems and I use MuJoCo for simulation.

My setup

MuJoCo 3.2.7 on PyPi (Python), AMD64, Ubuntu 24.04

What's happening? What did you expect?

Running within a Bazel module:

INFO: Running command line: bazel-bin/mujoco_py
/home/david/.cache/bazel/_bazel_david/f695e6f26414630bc7daef67dcbe0426/execroot/_main/bazel-out/k8-fastbuild/bin/mujoco_py.runfiles/.mujoco_py.venv/lib/python3.12/site-packages/glfw/init.py:917: GLFWError: (65548) b'Wayland: The platform does not provide the window position'
warnings.warn(message, GLFWError)

Attempts to import GLFW directly haven't worked to eliminate this from popping up every time the viewer is opened.

Steps for reproduction

  1. Run the code below.
  2. Get the warning message.

Minimal model for reproduction

Shouldn't need this if you import the robot_descriptions package as follows

Code required for reproduction

import time
import mujoco
import mujoco.viewer
from robot_descriptions.loaders.mujoco import load_robot_description


model = load_robot_description("panda_mj_description")
data = mujoco.MjData(model)

with mujoco.viewer.launch_passive(model, data) as viewer:
    try:
        while viewer.is_running():
            step_start = time.time()
            mujoco.mj_step(model, data)
            with viewer.lock():
                viewer.opt.flags[mujoco.mjtVisFlag.mjVIS_CONTACTPOINT] = int(data.time % 2)
            viewer.sync()
            time_until_next_step = model.opt.timestep - (time.time() - step_start)
            if time_until_next_step > 0:
                time.sleep(time_until_next_step)
    except KeyboardInterrupt:
        pass

Confirmations

@david-dorf david-dorf added the bug Something isn't working label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant