We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
MuJoCo dev. Original bug report in #2199
n/a
The box-sphere collider returns correct contact positions, but the depth (contact.dist) is wrong after full penetration of the sphere into the box.
contact.dist
Run the code below, get this plot
See below.
xml = """ <mujoco> <worldbody> <geom name="plane" pos="0 0 -.005" type="plane" size="0.5 0.5 0.01"/>--> <geom name="box" type="box" pos = "0 0 -0.255" size="0.5 0.5 .25" /> <body> <freejoint/> <geom name="sphere" type="sphere" mass="1" size="0.005"/> </body> </worldbody> </mujoco> """ model = mujoco.MjModel.from_xml_string(xml) data = mujoco.MjData(model) depth = np.linspace(-.01, -1e-6, 200) contact = [[], []] for z in depth: data.qpos[2] = z mujoco.mj_forward(model, data) for i in range(2): c = data.contact[i] condata = np.array((c.pos[2], c.dist)) contact[i].append(condata) plt.plot(depth, contact[0], label=['plane contact pos', 'plane contact depth']); plt.plot(depth, contact[1], '--', label=['box contact pos', 'box contact depth']); plt.xlabel('Penetration (m)'); plt.legend()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Intro
MuJoCo dev. Original bug report in #2199
My setup
n/a
What's happening? What did you expect?
The box-sphere collider returns correct contact positions, but the depth (
contact.dist
) is wrong after full penetration of the sphere into the box.Steps for reproduction
Run the code below, get this plot
Minimal model for reproduction
See below.
Code required for reproduction
Confirmations
The text was updated successfully, but these errors were encountered: