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

[Bug Report] MuJoCo/Walker2d left foot has different friction than right foot #477

Closed
1 task done
Kallinteris-Andreas opened this issue May 2, 2023 · 7 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@Kallinteris-Andreas
Copy link
Collaborator

Kallinteris-Andreas commented May 2, 2023

Describe the bug

Right foot has a friction coeff of 0.9
https://github.com/Farama-Foundation/Gymnasium/blob/main/gymnasium/envs/mujoco/assets/walker2d.xml#L25
left foot has a friction coeff of 1.9
https://github.com/Farama-Foundation/Gymnasium/blob/main/gymnasium/envs/mujoco/assets/walker2d.xml#L38

This issue was previously reported, but not addressed.
openai/gym#1068
openai/gym#1646

from what I can tell, this is most likely a typo
both were supposed to be 1.9 (or 2.0)

Since Walker2d and Hopper will be getting new models in v5 (cause google-deepmind/mujoco#833)
should this be fixed there?

Code example

No response

System info

No response

Additional context

No response

Checklist

  • I have checked that there is no similar issue in the repo
@Kallinteris-Andreas Kallinteris-Andreas added the bug Something isn't working label May 2, 2023
@pseudo-rnd-thoughts
Copy link
Member

@Kallinteris-Andreas Yes that is crazy it wasn't fixed at the time for v4.

This should affect the performance of older models but could you test training performance with 0.9 or 1.9 to know if it matters which value we use?

@Kallinteris-Andreas
Copy link
Collaborator Author

The coeff supposed to be 1.9 or 2.0, 0.9 does not make sense,

I will do a minimal test soon(-ish)

@Kallinteris-Andreas Kallinteris-Andreas changed the title [Bug Report] MuJoCo/Walker2d left foot has different friction than left foot [Bug Report] MuJoCo/Walker2d left foot has different friction than right foot May 2, 2023
@Kallinteris-Andreas
Copy link
Collaborator Author

Kallinteris-Andreas commented May 2, 2023

image
SB3 seed=0 (v4 modes were used a not v5)

i can verify that the friction coeff does matter significantly impact the model unlike what was suggested in the previous issues.

I will go with 2.0 since this is the value in Hopper, and Walker2D is supposed to be "double Hopper".

@pseudo-rnd-thoughts
Copy link
Member

image

What value is this with?

@Kallinteris-Andreas
Copy link
Collaborator Author

Kallinteris-Andreas commented May 2, 2023

friction=2 it says so in the legend
v4 is what is shipped in Walker2D-v4

@Kallinteris-Andreas
Copy link
Collaborator Author

Kallinteris-Andreas commented May 9, 2023

Setting feet friction to 2.0
results in a model learning this policy:
https://raw.githubusercontent.com/Kallinteris-Andreas/gym-mjc-v5-model-validation/main/walker_feet_friction%3D2.gif
Essentially a 2 legged hopper not a 'walker'

policy was trained with SB3/TD3 2mil steps

I will try settings feet friction to 1.0 to see if we a get a model that can efficiency walk.

Note: from the research [Walker2d-v1](https://github.com/openai/roboschool/blob/master/roboschool/mujoco_assets/walker2d.xml

If any of you know where I could find any development documention as to why the models were designed the way they are, please let me know

@Kallinteris-Andreas
Copy link
Collaborator Author

Kallinteris-Andreas commented May 10, 2023

I have set feet friction to 1.9, it appears to be walking (note: 2.0 would likely also be able to walk, but on that it may have developed that policy)

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

2 participants