Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Fixed
^^^^^

* Fixed ``test_visualizer_cartpole_integration::test_cartpole_newton_visualizer_viewergl_rgb_motion``
returning a fully-black ``ViewerGL.get_frame`` buffer on the Newton 1.2.0rc2
+ warp 1.13 cohort. ``NewtonVisualizer._apply_camera_pose`` was assigning
``self._viewer.camera.pos = wp.vec3(*cam_pos)``, but Newton's
``Camera.translate()`` adds a ``pyglet.math.Vec3`` delta with ``+=``.
warp 1.13's strict ``__add__`` rejects ``wp.vec3 + pyglet.math.Vec3``
with ``TypeError``; the exception was silenced by the visualizer's
``try/except``, which prevented ``renderer.render()`` from ever running
-- so the framebuffer stayed empty and read back as all zeros. The fix
assigns ``pyglet.math.Vec3`` instead, matching what Newton uses internally.
* Re-enabled ``test_cartpole_newton_visualizer_viewergl_rgb_motion`` after the
workaround skip in https://github.com/isaac-sim/IsaacLab/pull/5538.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import numpy as np
import warp as wp
from newton.viewer import ViewerGL
from pyglet.math import Vec3 as PygletVec3

from isaaclab.visualizers.base_visualizer import BaseVisualizer

Expand Down Expand Up @@ -463,7 +464,8 @@ def _apply_camera_pose(self, pose: tuple[tuple[float, float, float], tuple[float
if self._viewer is None:
return
cam_pos, cam_target = pose
self._viewer.camera.pos = wp.vec3(*cam_pos)
# Match Newton's Camera native pos type: PyVec3, not wp.vec3.
self._viewer.camera.pos = PygletVec3(*cam_pos)
cam_pos_np = np.array(cam_pos, dtype=np.float32)
cam_target_np = np.array(cam_target, dtype=np.float32)
direction = cam_target_np - cam_pos_np
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,22 +522,6 @@ def test_cartpole_newton_visualizer_tiled_camera_rgb_non_black(


@pytest.mark.isaacsim_ci
@pytest.mark.skip(
reason=(
"ViewerGL.get_frame returns a fully-black 600x600x3 buffer in CI on the current "
"Isaac Sim image + Newton 1.2.0rc2 + warp-lang 1.13 cohort. Failure is "
"deterministic across two consecutive reruns of the same SHA and reproduces on "
"every PR that touches the rendering / camera / sensor / USD stack (5 PRs hit it "
"in the last 100 build.yaml runs); zero failures on PRs outside that scope. "
"Investigation ruled out: rc1->rc2 viewer code diff (7-line image_logger.clear "
"only), wp.RegisteredGLBuffer API (byte-identical 1.12 vs 1.13), pure flakiness "
"(deterministic), and the bump cohort alone (warp-1.12 branches both pass and "
"fail). Strongest remaining hypothesis: a CUDA-OpenGL interop init-order "
"fragility in the PBO + glReadPixels + RegisteredGLBuffer.map path that gets "
"tipped by any source change perturbing GL/CUDA bring-up. Re-enable once root "
"cause is identified."
)
)
@pytest.mark.parametrize("backend_kind", ["physx", "newton"])
def test_cartpole_newton_visualizer_viewergl_rgb_motion(backend_kind: str, caplog: pytest.LogCaptureFixture) -> None:
"""Newton GL (``ViewerGL.get_frame``): full motion steps, last frame non-black; early vs late differ; logs."""
Expand Down
Loading