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

Collision Detection Issue in Pusher-v4 Environment with Mujoco > 2.3.7 #1495

Closed
HernandezEduin opened this issue Mar 11, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@HernandezEduin
Copy link

Issues with Collisions
I've been exploring reinforcement learning for a project and decided to utilize the Pusher-v4 environment available through Mujoco and Gymnasium. My approach was informed by examples from CleanRL, aiming to gain a deeper understanding of the coding practices within this domain. However, I encountered a notable issue: the robot, which is expected to learn to push an object towards a goal, instead passes through the object without any collision.

Upon consultation with the community and specific members (@Kallinteris-Andreas), we've pinpointed that this issue arises exclusively with Mujoco versions post 2.3.7. For reference and further investigation, I've detailed this observation at the following Gymnasium GitHub issue.

I'm looking forward to any insights or solutions to address this collision detection problem.

Reproducibility
You can test this behaviour with the following code I modified from clearnrl and trained model:
cleanrl.zip

Mujoco Ver. 2.3.7

mujoco.2.3.7.mp4

Mujoco Ver. 3.0.0

mujoco.3.0.0.mp4

Context

  • OS: Windows 10
  • Python: 3.8.18
  • Issues in: MuJoCo version 3.0.0 and up
  • Bindings:
    • pytorch
    • mujoco == 2.3.7 or 3.0.0,
    • gymnasium == 0.29.1,
    • gymnasium[mujoco],
@HernandezEduin HernandezEduin added the bug Something isn't working label Mar 11, 2024
@HernandezEduin HernandezEduin changed the title ollision Detection Issue in Pusher-v4 Environment with Mujoco > 2.3.7 Collision Detection Issue in Pusher-v4 Environment with Mujoco > 2.3.7 Mar 11, 2024
@Kallinteris-Andreas
Copy link

@yuvaltassa
Copy link
Collaborator

This is not a collision detection problem, this is a modeling problem. Visualize contacts and you will see that they are fine.

The underlying problem is density="0.00001" which is 1e-5 the density of air, your object weighs 1e-8Kg. Why would you do that? The reason this affects contact forces is that you also have armature and damping set for all joints. Combined with the silly mass of your cylinder, it effectively locks it in place.

The reason for the discrepancy between the versions is bugfix 33 in 3.0.0. You have a positive margin set for all geoms, which is making your cylinder collide with the table. Again, just visualize contacts and you will see this...

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