Skip to content

Commit 78c89bb

Browse files
authored
Declare pyglet for Newton GL features (#6179)
## Summary - Add explicit `pyglet>=2.1.6,<3` dependencies for Newton GL visualizer/video extras. - Update the `newton` extra install message to include pyglet. - Document the `glCreateShader` failure mode as an OpenGL-context/session problem rather than a task or Newton physics failure. ## Root cause Newton ViewerGL requires pyglet/OpenGL, but Isaac Lab's Newton GL packages did not declare pyglet directly. Separately, the reported Windows stack means pyglet obtained an OpenGL context that does not expose OpenGL 2.0 shader functions; an RTX PRO 6000 driver should expose that, so the process is not receiving the NVIDIA OpenGL context in that automation/display session. ## Testing - `pre-commit run --files docs/source/overview/core-concepts/visualization.rst source/isaaclab/isaaclab/cli/commands/install.py source/isaaclab_newton/pyproject.toml source/isaaclab_visualizers/pyproject.toml source/isaaclab/changelog.d/zhengyuz-newton-pyglet-install-message.rst source/isaaclab_newton/changelog.d/zhengyuz-newton-gl-pyglet-dependency.rst source/isaaclab_visualizers/changelog.d/zhengyuz-newton-pyglet-dependency.rst` - `python3 tools/changelog/cli.py check develop` - `git diff --check`
1 parent d60ee5a commit 78c89bb

7 files changed

Lines changed: 33 additions & 1 deletion

File tree

docs/source/overview/core-concepts/visualization.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,18 @@ The visualizer will still function correctly but may experience reduced performa
646646
CPU copy operations instead of direct GPU memory sharing.
647647

648648

649+
**Newton Visualizer OpenGL Context Failures**
650+
651+
The Newton visualizer is an OpenGL window. If pyglet reports that
652+
``glCreateShader`` is not exported or that OpenGL 2.0 is required, the Python
653+
process did not receive a usable OpenGL 2.0+ context from the active Windows or
654+
Linux display session. This usually means the process is running in a
655+
non-interactive/service session, through a remote desktop path without GPU
656+
OpenGL acceleration, or with a software/basic OpenGL provider instead of the
657+
NVIDIA driver. Run from a GPU-backed interactive display session, or omit
658+
``--visualizer newton`` for headless inference.
659+
660+
649661
**Newton Visualizer on Spark with Conda**
650662

651663
When running the Newton visualizer on Spark inside a conda environment, conda-installed X11 libraries
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Changed
2+
^^^^^^^
3+
4+
* Updated the ``newton`` extra installation message to list the Newton GL
5+
viewer's ``pyglet`` dependency.

source/isaaclab/isaaclab/cli/commands/install.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,9 @@ def _install_extra_feature(feature_name: str, selector: str = "") -> None:
652652
elif feature_name == "newton":
653653
if selector:
654654
print_warning(f"'newton' does not support selectors (got '{selector}'). Installing all newton extras.")
655-
print_info("Installing newton extras (newton[sim], PyOpenGL-accelerate, imgui-bundle, typing-extensions)...")
655+
print_info(
656+
"Installing newton extras (newton[sim], pyglet, PyOpenGL-accelerate, imgui-bundle, typing-extensions)..."
657+
)
656658
run_command(pip_cmd + ["install", "--editable", f"{source_dir}/isaaclab_newton[all]"])
657659
run_command(pip_cmd + ["install", "--editable", f"{source_dir}/isaaclab_physx[newton]"])
658660
run_command(pip_cmd + ["install", "--editable", f"{source_dir}/isaaclab_visualizers[newton]"])
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Fixed
2+
^^^^^
3+
4+
* Added an explicit ``pyglet>=2.1.6,<3`` dependency for Newton GL video
5+
recording support.

source/isaaclab_newton/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Repository = "https://github.com/isaac-sim/IsaacLab"
2626
all = [
2727
"prettytable>=3.3.0",
2828
"PyOpenGL-accelerate>=3.1.0",
29+
"pyglet>=2.1.6,<3",
2930
"newton[sim] @ git+https://github.com/newton-physics/newton.git@811968bfb7cc7ff4e37b9260a2ba56930a3e605e",
3031
]
3132

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Fixed
2+
^^^^^
3+
4+
* Added an explicit ``pyglet>=2.1.6,<3`` dependency for the Newton visualizer
5+
extra so the OpenGL viewer does not rely on ambient transitive installs.

source/isaaclab_visualizers/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ newton = [
3131
"warp-lang",
3232
"newton[sim] @ git+https://github.com/newton-physics/newton.git@811968bfb7cc7ff4e37b9260a2ba56930a3e605e",
3333
"PyOpenGL-accelerate",
34+
"pyglet>=2.1.6,<3",
3435
"imgui-bundle>=1.92.5",
3536
"typing-extensions>=4.15.0",
3637
]
@@ -47,6 +48,7 @@ all = [
4748
"imgui-bundle>=1.92.5",
4849
"newton[sim] @ git+https://github.com/newton-physics/newton.git@811968bfb7cc7ff4e37b9260a2ba56930a3e605e",
4950
"PyOpenGL-accelerate",
51+
"pyglet>=2.1.6,<3",
5052
# Match rerun-sdk's supported Arrow stack and avoid resolver drift across environments.
5153
"pyarrow==22.0.0",
5254
"rerun-sdk>=0.29.0",

0 commit comments

Comments
 (0)