Skip to content

Add explicit contact params to peg geom to fix peg-insert-side under mujoco>=3.4 - #578

Open
rainx0r wants to merge 3 commits into
Farama-Foundation:mainfrom
rainx0r:mujoco-upgrade
Open

Add explicit contact params to peg geom to fix peg-insert-side under mujoco>=3.4#578
rainx0r wants to merge 3 commits into
Farama-Foundation:mainfrom
rainx0r:mujoco-upgrade

Conversation

@rainx0r

@rainx0r rainx0r commented May 20, 2026

Copy link
Copy Markdown
Contributor

MuJoCo 3.4 fixed a box-box collision behaviour bug, which in turn broke peg-insert-side. Copying over the contact params from the gripper pads in xyz_base.xml and making them explicit on the peg rather than using the defaults seems to fix it.

This does change the environment dynamics, but also so does the MuJoCo 3.4 box-box collision bug fix.

Draft status

What remains to be done is:

  • Collect data on MuJoCo 3.3 to see how these explicit collision parameters on the peg affect trajectories quantitatively and qualitatively
  • Run MT1 runs on peg-insert-side-v3 before/after the collision parameter change, on MuJoCo 3.3, to see how it affects policy learning
  • Run MT1 runs on peg-insert-side-v3 on MuJoCo 3.8.1 using this patch and compare qualitatively and quantitatively the policy and learning dynamics to the unchanged MuJoCo 3.3 environment

rainx0r added 2 commits May 20, 2026 11:08
…mujoco>=3.4

MuJoCo 3.4 fixed a box-box collision behaviour bug, which in turn broke
peg-insert-side. Copying over the contact params from the gripper pads
in xyz_base.xml and making them explicit on the peg rather than using
the defaults seems to fix it.
@reginald-mclean
reginald-mclean marked this pull request as ready for review June 24, 2026 20:30
@reginald-mclean

Copy link
Copy Markdown
Collaborator

@rainx0r CI passes, I will run some single task experiments over the weekend to see how things are affected.

@rainx0r

rainx0r commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

I did actually run some single task experiments already and it seems like learning behaviour isn't identical, but it's somewhat similar. I have some WIP work trying to use optimisation to find the correct contact parameters such that after using a newer MuJoCo version the environment behaviour is more similar to the current version / contact params (what my second commit does) but it's not yet complete. I need to double check how close the trajectories are and report back, I believe it matches closely but the learning dynamics are still not the same as the old version so I was going to investigate further.

I also ran some MT10 experiments and it seems like the difference in downstream learning that setting is less pronounced than in MT1 experiments.

@reginald-mclean

Copy link
Copy Markdown
Collaborator

@rainx0r can you show some logs/performance curves that higlight these differences?

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.

3 participants