Skip to content

tests/sim: GOLEM_TEST_VIDEO=1 records the MuJoCo viewer and RViz side by side - #19

Open
maxconwa wants to merge 2 commits into
mainfrom
sim_video
Open

maxconwa wants to merge 2 commits into
mainfrom
sim_video

Conversation

@maxconwa

Copy link
Copy Markdown
Contributor

What

GOLEM_TEST_VIDEO=1 tests/sim/test_sim_stack.sh --h12|--g1 runs the closed-loop test with the sim's MuJoCo viewer and the bringup's RViz open on the host's X display, records both windows live, and writes OUT/stack.mp4 with the two side by side (1080 px high).

  • Display: gui mode through a per-run Xauthority file with a wildcard cookie (the test containers have their own hostname and no network); deleted at the end.
  • Recording: on the host, ffmpeg x11grab by X window id, so covered windows are still recorded. It waits for the run's own MuJoCo and RViz windows (windows already open are ignored), starts both 3 s after both appear, 25 fps, pinned to the ros container's CPUs when pinning is on.
  • Output: stack.mp4, video_mujoco.mkv, video_rviz.mkv, video.log. A failed video is reported and does not fail the test.
  • No Docker image changes. The test refuses to start without DISPLAY, xauth, xwininfo or an x11grab ffmpeg.

Testing

  • H1-2 with video: 14/14 checks, real-time factor 1.00; stack.mp4 42 s, viewer and RViz side by side.
  • tests/docker: 115 passed.

Notes

The live windows add rendering load beside the run, so runs without the video remain the gate. The end of video.log carries x11grab errors from the windows closing as the run stops; the recordings are complete.

🤖 Generated with Claude Code

https://claude.ai/code/session_015EG7p8sgY1ZVi6unbbLp4J

maxconwa and others added 2 commits November 16, 2026 22:44
… by side

With GOLEM_TEST_VIDEO=1, test_sim_stack.sh runs the sim with its viewer and
the bringup with RViz on the host's X display (a per-run Xauthority file
with a wildcard cookie, since the containers have their own hostname and no
network), and the host records both windows by id with ffmpeg's x11grab
from 3 s after both appear, on the ros container's CPUs, into OUT/stack.mp4,
side by side at 1080 px. A failed video is reported, not a failed test.

Run with it on the H1-2: 14/14 checks, real-time factor 1.00.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015EG7p8sgY1ZVi6unbbLp4J
…frames

The NVIDIA driver's direct-rendered GLX frames never reach the X server, so
x11grab recorded the MuJoCo viewer as stale frames (0.4 distinct frames/s).
In a video run the sim's GLX goes to Mesa's software renderer; EGL, which the
cameras and the lidar use, stays on the GPU. H1-2 run: 14/14 checks,
real-time factor 1.00, the viewer's half 6-9 distinct frames/s while walking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015EG7p8sgY1ZVi6unbbLp4J
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