Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent box-box contact with positive contact margin #2471

Open
2 tasks done
jjyyxx opened this issue Mar 5, 2025 · 2 comments
Open
2 tasks done

Intermittent box-box contact with positive contact margin #2471

jjyyxx opened this issue Mar 5, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jjyyxx
Copy link
Contributor

jjyyxx commented Mar 5, 2025

Intro

Hi!

I am a graduate student at HKU, I use MuJoCo for my research on robotic manipulation.

My setup

MuJoCo 3.3.0, Python and C, Linux

What's happening? What did you expect?

When setting box geom with positive margin (nativeccd on by default, multiccd off), the box-box contact becomes intermittent under certain settings. The model below is reduced from more legitimate use cases. In this simple setting, it is necessary to have quat="1 0 1e-6 0" or larger to avoid perfectly aligned boxes, to see the intermittent contact. When margin is set to zero, the behavior disappears.

Steps for reproduction

  • Setting the actuator to 1e-7 to make two geoms contact. Turn on the contact point/force rendering to visualize.

Minimal model for reproduction

<mujoco>
  <compiler angle="radian" />

  <worldbody>
    <body name="1" quat="1 0 1e-6 0">
      <geom type="box" size="0.007 0.007 0.01" pos="0 0 0.05" condim="1" />
    </body>
    <body name="2" pos="0 0.02 0">
      <joint name="2" axis="1 0 0" />
      <geom type="box" size="0.007 0.007 0.01" pos="0 0 0.06" condim="1" margin="0.0005" />
    </body>
  </worldbody>

  <actuator>
    <motor name="2" joint="2" ctrlrange="0 1e-7" />
  </actuator>
</mujoco>

Code required for reproduction

Confirmations

@jjyyxx jjyyxx added the bug Something isn't working label Mar 5, 2025
@yuvaltassa
Copy link
Collaborator

Presumably I can close #2472?

@yuvaltassa
Copy link
Collaborator

Clearly something to do with margin. This is not a very highly used feature so there may be some latent bugs. This is indeed interesting and worth a look. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants