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

Mummified Musculoskeletal Model #182

Open
irfanmohamed12 opened this issue Jul 5, 2024 · 16 comments
Open

Mummified Musculoskeletal Model #182

irfanmohamed12 opened this issue Jul 5, 2024 · 16 comments
Assignees

Comments

@irfanmohamed12
Copy link

irfanmohamed12 commented Jul 5, 2024

Executing a simple step of the environment results in a weird reproduction of the musculoskeletal model.

env = gym.make('myoElbowPose1D6MRandom-v0')
env.reset()
for _ in range(1000):
env.mj_render()
env.step(env.action_space.sample()) # take a random action
env.close()

image

Any reason why this issue occurs?

Other information:
Windows 11 Enterprise
Python 3.9.13
Myosuite 2.4.0

@Vittorio-Caggiano
Copy link
Collaborator

hi @irfanmohamed12 , can you provide operating system, python version and myosuite version?

@Vittorio-Caggiano
Copy link
Collaborator

@irfanmohamed12 is this issue still open?

@irfanmohamed12
Copy link
Author

it is still open indeed...

@Vittorio-Caggiano
Copy link
Collaborator

@elladyr can you help replicating this issue?

@elladyr elladyr self-assigned this Aug 11, 2024
@elladyr
Copy link
Collaborator

elladyr commented Aug 11, 2024

@Vittorio-Caggiano
I managed to replicate this issue on a few combinations of platform and Myosuite versions

  1. Myosuite versions
  • 2.4.0
  • 2.5.0
  1. Win 11 Pro
  • Python 3.9.13
  • Python 3.10.14
  1. Win 11 WSL (Ubuntu 20.04)
  • Python 3.9.13
  • Python 3.10.14
  1. Render modes
  • Onscreen rendering - mj_render(), env.renderer.render_to_window()
  • Offscreen rendering - env.renderer.render_offscreen()

When rendering, it seems that the convex hull flag is always activated. This affects all the myoElbow and myoElbowExo environments. I have also checked on the Locomotion environments and they are unaffected.

How should we proceed in this case?

@PeterHe0226
Copy link

To solve the issue, unwrap the linen on the mummy manually. First import Numpy, then use np.unwrap() until the body is exposed.

@Vittorio-Caggiano
Copy link
Collaborator

thanks @PeterHe0226, really appreciate your help!

Can you please add a snippet of code how this fix should run?

@vikashplus
Copy link
Collaborator

vikashplus commented Sep 4, 2024

I just tested it on Mac with MyoSuite version: 2.5.0 and it looks perfect. So we can rule out MyoSuite versioning being the issue.

python myosuite/utils/examine_env.py -e myoElbowPose1D6MRandom-v0

Next is to check the list of dependencies. We have a suspicion that this is related to Python and Numpy versions.

Here is what I have and what my outputs look like

python 3.8.18 
pip 23.3.1
numpy 1.24.4
image

@vikashplus
Copy link
Collaborator

@elladyr - can you try versions I posted above on windows so we can rule out platforms as the issue as well.

@elladyr
Copy link
Collaborator

elladyr commented Sep 4, 2024

@vikashplus

I checked the version already and it is a specific Windows problem. When rendering, it seems that the convex hull flag is always activated. This affects all the myoElbow and myoElbowExo environments. I have also checked on the Locomotion environments and they are unaffected.

How should we proceed in this case?

Tested on:
Myosuite versions

  • 2.4.0
  • 2.5.0

Win 11 Pro

  • Python 3.9.13
  • Python 3.10.14

Win 11 WSL (Ubuntu 20.04)

  • Python 3.9.13
  • Python 3.10.14

Render modes

  • Onscreen rendering - mj_render(), env.renderer.render_to_window()
  • Offscreen rendering - env.renderer.render_offscreen()

@vikashplus
Copy link
Collaborator

@elladyr
Can you try the latest MyoSuite with these versions of python, pip, and numpy

python 3.8.18 
pip 23.3.1
numpy 1.24.4

@elladyr
Copy link
Collaborator

elladyr commented Sep 4, 2024

Checked with both Win 11 Pro and Win 11 WSL (Ubuntu 20.04).

Checked for Myosuite versions

  • 2.4.0
  • 2.5.0

using

python 3.8.18 
pip 23.3.1
numpy 1.24.4

No convex hull activated
screenshot_output

@vikashplus
Copy link
Collaborator

That confirms that it's a dependency issue.

@Vittorio-Caggiano
Copy link
Collaborator

this seems to be a MuJoCo issue about not supporting yet numpy> 2.0 google-deepmind/mujoco#1808 (comment)

@vikashplus
Copy link
Collaborator

Should we pin the Python version and numpy version in that case?

@gandie
Copy link

gandie commented Sep 7, 2024

Can confirm this issue on Windows 11 using Python 3.12 .

Workaround was to install yet another Python Interpreter ( 3.8 , im a collector, gotta install em all 😄 ) and rebuild virtualenv with it.

Should we pin the Python version and numpy version in that case?

If u pin to Python3.8 and numpy < 2.0 u need to remember to unpin as soon as the MuJoCo guys bump to numpy > 2.0 .

I suggest linking the information from this issues in README in order to point people to the solution for now.

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

No branches or pull requests

6 participants