Skip to content

Prefer GLFW X11 backend when no Wayland display is set (cherry-pick #11) - #12

Merged
lgulich merged 1 commit into
impedence-control-supportfrom
lgulich/glfw-x11-hint-impedance
Oct 7, 2026
Merged

lgulich merged 1 commit into
impedence-control-supportfrom
lgulich/glfw-x11-hint-impedance

Conversation

@lgulich

@lgulich lgulich commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Cherry-pick of #11 (merged to main) onto impedence-control-support, the branch Isaac ROS pins. Only conflict was include order in mujoco_simulation.cpp (kept both glfw_platform.hpp and render_loop_exit.hpp).

 MujocoSimulation::initialize
+  prefer_x11_without_wayland_display()   # viewer glfwInit()
 CameraPlugin::init
+  prefer_x11_without_wayland_display()   # camera glfwInit()

See #11 for root cause (GLFW 3.4 probes Wayland first when XDG_SESSION_TYPE is unset; libwayland prints XDG_RUNTIME_DIR is invalid or not set inside Docker).

Evidence

Isaac main Bazel build overriding mujoco_ros2_control with this branch, unitree_g1_controller_manager.launch.py hardware_type:=mujoco initial_controller_group:=agile_velocity, env without XDG_RUNTIME_DIR/XDG_SESSION_TYPE/WAYLAND_DISPLAY:

  • Before (current pin): XDG_RUNTIME_DIR is invalid → 2
    After (this branch): → 0; controllers switch successfully.
  • //ros_ws/src/isaac_ros_robots/unitree_g1/unitree_g1_bringup:test_agile_velocity_ros2_control PASSED; all //ros_ws/src/isaac_ros_robots/... and mujoco_ros2_control deb targets build.

Merge Danger

Door: two-way

Blast Radius: small

Only GLFW platform selection when WAYLAND_DISPLAY is unset.

🤖 Generated with Claude Code

GLFW >= 3.4 built with both Wayland and X11 probes Wayland first when XDG_SESSION_TYPE is unset, so inside Docker libwayland prints "error: XDG_RUNTIME_DIR is invalid or not set in the environment." before GLFW falls back to X11. Hint the X11 platform before every glfwInit() (viewer and camera plugin, which can each carry their own statically linked GLFW) when WAYLAND_DISPLAY is unset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0c75738)
@lgulich
lgulich merged commit 04d01df into impedence-control-support Oct 7, 2026
3 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant