0

I want to make my custom mujoco gym env, but since it is hard, I deleted the xml script of hopper.xml and replace with the code I write. So if I do ''' env = gym.make("Hopper-v4") env.render() ''' I thought I could see the xml file I write. But instead, the Hopper xml was still rendered. I have no idea where did it comes from because I deleted that xml file! Is their other path that gym could import xml file?

Hobbit
  • 1

1 Answers1

0

I believe you should provide more information regarding your question.

When you install the gym package it also downloads the necessary xml files and python scripts that involves gym environments associated with the xml files depending on the MuJoCo Env files. So if you created another xml file with the same name, altered and deleted it later gym still can reach to the original hopper.xml which comes with the package.

I also advise you to use gymnasium package instead of gym and import it as

import gymnasium as gym

Which is better way as gym package can depend on mujoco-py for python bindings but starting from the mujoco 2.1.2 it includes native python bindings and gymnasium mujoco environments are supporting it resulting less compatibility errors.

If you want you can read the MuJoCo documentation from here. And if you want to see the gymnasium environments you can find it here.

DenizNm
  • 1
  • 1