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

关于dd_kitchen的代码问题 #39

Closed
HenryZhang-git opened this issue Dec 5, 2024 · 2 comments
Closed

关于dd_kitchen的代码问题 #39

HenryZhang-git opened this issue Dec 5, 2024 · 2 comments

Comments

@HenryZhang-git
Copy link

您好,当我运行dd_kitchen时出现了这样的报错:
Traceback (most recent call last): File "C:\Users\33908\Desktop\CleanDiffuser1\pipelines\dd_d4rl_kitchen.py", line 34, in pipeline env = gym.make(args.task.env_name) File "C:\Users\33908\mambaforge\envs\cleandiffuser1\lib\site-packages\gym\envs\registration.py", line 235, in make return registry.make(id, **kwargs) File "C:\Users\33908\mambaforge\envs\cleandiffuser1\lib\site-packages\gym\envs\registration.py", line 129, in make env = spec.make(**kwargs) File "C:\Users\33908\mambaforge\envs\cleandiffuser1\lib\site-packages\gym\envs\registration.py", line 90, in make env = cls(**_kwargs) File "c:\users\33908\d4rl\d4rl\kitchen\adept_envs\utils\configurable.py", line 132, in __init__ base_init(self, *args, **kwargs) File "c:\users\33908\d4rl\d4rl\kitchen\kitchen_envs.py", line 39, in __init__ super(KitchenBase, self).__init__(**kwargs) File "c:\users\33908\d4rl\d4rl\kitchen\adept_envs\franka\kitchen_multitask_v0.py", line 181, in __init__ super(KitchenTaskRelaxV1, self).__init__() File "c:\users\33908\d4rl\d4rl\kitchen\adept_envs\utils\configurable.py", line 132, in __init__ base_init(self, *args, **kwargs) File "c:\users\33908\d4rl\d4rl\kitchen\adept_envs\franka\kitchen_multitask_v0.py", line 46, in __init__ super().__init__( File "c:\users\33908\d4rl\d4rl\kitchen\adept_envs\robot_env.py", line 80, in __init__ super(RobotEnv, self).__init__( File "c:\users\33908\d4rl\d4rl\kitchen\adept_envs\mujoco_env.py", line 62, in __init__ self.sim_robot = MujocoSimRobot( File "c:\users\33908\d4rl\d4rl\kitchen\adept_envs\simulation\sim_robot.py", line 61, in __init__ self.sim = dm_mujoco.Physics.from_xml_path(model_file) File "C:\Users\33908\mambaforge\envs\cleandiffuser1\lib\site-packages\dm_control\mujoco\engine.py", line 461, in from_xml_path model = wrapper.MjModel.from_xml_path(file_path) File "C:\Users\33908\mambaforge\envs\cleandiffuser1\lib\site-packages\dm_control\mujoco\wrapper\core.py", line 306, in from_xml_path model_ptr = _get_model_ptr_from_xml(xml_path=xml_path) File "C:\Users\33908\mambaforge\envs\cleandiffuser1\lib\site-packages\dm_control\mujoco\wrapper\core.py", line 181, in _get_model_ptr_from_xml ptr = mujoco.MjModel.from_xml_path(xml_path, assets or {}) ValueError: XML Error: top-level default class 'main' cannot be renamed Element 'default', line 0 Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
我查询了相关报错,是关于xml中main的重复使用,我不知道该如何修改,如果修改了d4rl中kitchen部分的xml,是否会影响我运行kitchen环境下的算法?

@Josh00-Lu
Copy link
Contributor

Josh00-Lu commented Dec 15, 2024

You can refer to this PR:
Farama-Foundation/Gymnasium-Robotics#255 (comment)

or use mujoco version <= 3.1.6.

@HenryZhang-git
Copy link
Author

You can refer to this PR: Farama-Foundation/Gymnasium-Robotics#255 (comment)

or use mujoco version <= 3.1.6.

Thanks, when I make mujoco==3.1.6 and dm_control==1.0.20, the code can be run.
pip install dm_control==1.0.20 mujoco==3.1.6

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

2 participants