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

Update mujoco_env.py xml file reading #1277

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KarahanS
Copy link

@KarahanS KarahanS commented Dec 16, 2024

Description

Change: Avoid calling from_xml_path and instead first read the file and then call from_xml_string with the content.

Issue: Calling from_xml_path gives the following error (although the file exists):
ValueError: ParseXML: Error opening file 'C:\Users\karab\Desktop\Archive\Tübingen Archive\ML-4350 Reinforcement Learning\code\env\lib\site-packages\gymnasium\envs\mujoco\assets\half_cheetah.xml': No such file or directory

It may be because, MuJoCo's C++ backend might handle file paths differently than Python. (See google-deepmind/mujoco#257 (comment))

Python: 3.9.13
gymnasium: 1.0.0
mujoco: 3.2.6

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

@Kallinteris-Andreas
Copy link
Collaborator

Kallinteris-Andreas commented Dec 16, 2024

are you using Microsoft's WSL?

@KarahanS
Copy link
Author

KarahanS commented Dec 16, 2024

I have WSL installed in my Windows machine, but I didn't run the code from WSL.

@Kallinteris-Andreas
Copy link
Collaborator

Kallinteris-Andreas commented Dec 16, 2024

try (the original) with WSL
also what MuJoCo version are you using

@KarahanS
Copy link
Author

I'm using mujoco 3.2.6.
I think requiring users to switch to WSL unnecessarily complicates the usage - that's why I opened the PR.

@Kallinteris-Andreas
Copy link
Collaborator

I just want to know if it's a Microsoft Windows issue Or the power shall issue.

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

Successfully merging this pull request may close these issues.

2 participants