Skip to content

feat: Add mujoco_ci_camera_resolution input to cap render cost on CI#23

Closed
davetcoleman wants to merge 1 commit into
mainfrom
feat/mujoco-ci-camera-resolution
Closed

feat: Add mujoco_ci_camera_resolution input to cap render cost on CI#23
davetcoleman wants to merge 1 commit into
mainfrom
feat/mujoco-ci-camera-resolution

Conversation

@davetcoleman
Copy link
Copy Markdown
Member

Summary

Mirrors the existing mujoco_ci_timestep override: adds a mujoco_ci_camera_resolution workflow input that, when set, rewrites every existing <camera ... resolution="..."> attribute under src/ to the supplied "WIDTH HEIGHT" value before build.

Motivation

PickNikRobotics/moveit_pro_example_ws#648 standardizes the workspace's MuJoCo <global offwidth offheight> to 1280×720 (forced by picknik_accessories's ur5e wrist_camera being 1280×720) and bumps the per-config <camera> resolutions to match. The ~3× pixel increase pushed lab_sim's objectives_integration_test past its 600s timeout on CI runners (baseline on main: 388s; this PR: >600s timeout, Exit Code Timeout).

The product change is intentional — the high-resolution global is required at load time, and 1280×720 cameras are what users will run with. CI just needs a way to render at lower fidelity to stay under timeout. This input is the camera-resolution analog of mujoco_ci_timestep.

Behavior

  • Input mujoco_ci_camera_resolution: "WIDTH HEIGHT" (string, default ""). Empty → no-op.
  • Validates with \d+\s+\d+ and rejects non-positive ints.
  • Iterates src/**/*.xml. For each file, rewrites every <camera ... resolution="..."> (single- or double-quoted, multi-line tag OK) to the supplied value. Leaves cameras without an existing resolution= alone (URDF cameras have non-MuJoCo <sensor> syntax).
  • Refuses to proceed silently if zero files match (mirrors mujoco_ci_timestep).
  • Leaves <global offwidth offheight> untouched. The load-time constraint is global >= max(camera), so shrinking cameras alone is sufficient and safe.

Dry-run against PickNikRobotics/moveit_pro_example_ws#648's worktree: 21 files / 25 cameras patched, including picknik_accessories/.../ur5e.xml's wrist_camera and the phoebe_ws submodule. No false positives.

Caveat

The blanket override will also rewrite space_satellite_sim_camera_cal's intentional 1920×1080 calibration cameras. There is no integration test for that config today, so this is fine; if one is added later it should opt out by reading the resolution from env in the test.

Rollout

Consumed by PickNikRobotics/moveit_pro_example_ws#648 (pins to this branch's HEAD SHA pending v0.2.2 release).

Mirrors the existing mujoco_ci_timestep override: when set, rewrites every
existing <camera ... resolution="..."> attribute under src/ to the supplied
"WIDTH HEIGHT" value before build. Used to keep perception-heavy integration
tests under their timeout when production scenes use high-resolution cameras
(e.g. 1280x720 to match the picknik_accessories ur5e wrist_camera).

Cameras without an existing resolution= attribute are left alone (URDF
cameras). The scene's <global offwidth offheight> is untouched -- the load-
time constraint is global >= max(camera), so shrinking cameras alone is safe.
davetcoleman added a commit to PickNikRobotics/moveit_pro_example_ws that referenced this pull request May 21, 2026
The 1280x720 camera bump in the previous commit ~3x's per-frame render cost,
pushing lab_sim's objectives_integration_test from a ~388s baseline past its
600s timeout on CI runners. Use the new mujoco_ci_camera_resolution input
from PickNikRobotics/moveit_pro_ci#23 to rewrite every <camera resolution>
to 640x480 at build time, leaving the production scene files (and the
load-time <global offwidth offheight> check) untouched.

Pinned to the PR's branch HEAD for now -- repin to v0.2.2 once that PR
merges and tags.
JWhitleyWork pushed a commit to PickNikRobotics/moveit_pro_example_ws that referenced this pull request May 21, 2026
The 1280x720 camera bump in the previous commit ~3x's per-frame render cost,
pushing lab_sim's objectives_integration_test from a ~388s baseline past its
600s timeout on CI runners. Use the new mujoco_ci_camera_resolution input
from PickNikRobotics/moveit_pro_ci#23 to rewrite every <camera resolution>
to 640x480 at build time, leaving the production scene files (and the
load-time <global offwidth offheight> check) untouched.

Pinned to the PR's branch HEAD for now -- repin to v0.2.2 once that PR
merges and tags.
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