Fix: Set MuJoCo arena memory to 64M in lab_sim scene#597
Merged
Conversation
…erflow
MuJoCo 3.3+ stopped growing the contact/constraint arena dynamically.
Without an explicit <size memory="..."/>, scene.xml falls back to a
conservative heuristic (~15 MB) that overflows during grasping, emits
mjWARN_CNSTRFULL ("Insufficient arena memory for the number of
constraints generated"), and silently drops constraint rows.
That surfaced as the flakiness reported in
PickNikRobotics/moveit_pro#18534:
- Pick April Tag Labeled Object (always)
- Push Button With a Trajectory (sometimes)
- ML Segment Point Cloud (sometimes)
- MPC Pose Tracking Static PC Avoidance with Sphere Down Sample (sometimes)
- MPC Pose Tracking With Static Sphere PC Avoidance (sometimes)
- Playback Square Trajectory (sometimes)
v9.2 is unaffected because it still ships MuJoCo 3.2.7, which grew the
arena on demand.
Verified locally with agent_robot.app MOVEIT_CONFIG_PACKAGE=lab_sim:
Pick April Tag Labeled Object, Push Button With a Trajectory, Playback
Square Trajectory, and MPC Pose Tracking With Static Sphere Point Cloud
Avoidance all SUCCEED and no mjWARN_CNSTRFULL is emitted.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the lab_sim MuJoCo scene configuration to prevent MuJoCo 3.6.0 constraint-solver arena overflows during grasping by explicitly setting the model arena memory size.
Changes:
- Add an explanatory comment describing why the arena size must be set for MuJoCo 3.3+ behavior.
- Set
<size ... memory="64M" />insrc/lab_sim/description/scene.xmlto avoidmjWARN_CNSTRFULLand dropped constraints.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
shaur-k
approved these changes
Apr 24, 2026
Member
Author
|
This does resolve an issue but not all of the issues introduced by the MuJoCo 3.6.0 upgrade so I'm force-merging this and will address the remaining issues in another PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sets
memory="64M"on the<size>element ofsrc/lab_sim/description/scene.xmlso MuJoCo 3.6.0 can keep all contact/constraint rows during grasping instead of silently dropping them.Fixes the flaky-CI regression on
maintracked in PickNikRobotics/moveit_pro#18534:Why
MuJoCo 3.2.7 → 3.6.0 (bundled in MoveIt Pro
mainsince PickNikRobotics/moveit_pro@6eedef8) changed how the constraint-solver arena is sized. In 3.2.7 the arena grew on demand. From 3.3+ it is statically sized at model compile time from the<size memory="..."/>attribute; whenmemoryis absent MuJoCo falls back to a conservative heuristic (roughly 15 MB for this scene).lab_sim/description/scene.xmlnever setmemory. With 11 free-joint bodies (6 tubes, 5 bottles), the UR5e + Robotiq 2f85 withcondim=4friction contacts, and the gripper closing on an object, the heuristic arena overflows — MuJoCo emitsmjWARN_CNSTRFULL("Insufficient arena memory for the number of constraints generated") and drops constraint rows. Dropped friction/contact constraints produce exactly the reported failures: objects sliding through the gripper, incorrect push forces, and unstable trajectory playback.The
v9.2branch is unaffected because it still ships MuJoCo 3.2.7, which grew the arena on demand.Test plan
overlay_ws(moveit_pro) anduser_ws(this repo) inside the dev container.agent_robot.appwithMOVEIT_CONFIG_PACKAGE=lab_simand confirmedYou can start planning now!.ros2 action send_goal /do_objective:Pick April Tag Labeled Object→ SUCCEEDEDPush Button With a Trajectory→ SUCCEEDEDPlayback Square Trajectory→ SUCCEEDEDMPC Pose Tracking With Static Sphere Point Cloud Avoidance→ SUCCEEDEDmjWARN_CNSTRFULLlines in the backend log and noMUJOCO_LOG.TXTwas written during the run.integration-test-in-studio-containerCI job on this PR to confirm the fulllab_simObjective suite passes.A matching release-notes entry will land in
moveit_proalongside this PR so downstream users know when they might need the same change in their ownscene.xml.🤖 Generated with Claude Code