Farama-Foundation / D4RL

A collection of reference environments for offline reinforcement learning
Apache License 2.0
1.29k stars 278 forks source link

[Bug Report] Need update franka kitchen xml #236

Open hilookas opened 1 month ago

hilookas commented 1 month ago

Describe the bug

Traceback (most recent call last):
  File "/home/ubuntu/CleanDiffuser/tutorials/1_a_minimal_DBC_implementation.py", line 39, in <module>
    env = gym.make("kitchen-complete-v0")
  File "/home/ubuntu/anaconda3/envs/cleandiffuser/lib/python3.9/site-packages/gym/envs/registration.py", line 676, in make
    return registry.make(id, **kwargs)
  File "/home/ubuntu/anaconda3/envs/cleandiffuser/lib/python3.9/site-packages/gym/envs/registration.py", line 520, in make
    return spec.make(**kwargs)
  File "/home/ubuntu/anaconda3/envs/cleandiffuser/lib/python3.9/site-packages/gym/envs/registration.py", line 140, in make
    env = cls(**_kwargs)
  File "/home/ubuntu/CleanDiffuser/D4RL/d4rl/kitchen/adept_envs/utils/configurable.py", line 132, in __init__
    base_init(self, *args, **kwargs)
  File "/home/ubuntu/CleanDiffuser/D4RL/d4rl/kitchen/kitchen_envs.py", line 39, in __init__
    super(KitchenBase, self).__init__(**kwargs)
  File "/home/ubuntu/CleanDiffuser/D4RL/d4rl/kitchen/adept_envs/franka/kitchen_multitask_v0.py", line 181, in __init__
    super(KitchenTaskRelaxV1, self).__init__()
  File "/home/ubuntu/CleanDiffuser/D4RL/d4rl/kitchen/adept_envs/utils/configurable.py", line 132, in __init__
    base_init(self, *args, **kwargs)
  File "/home/ubuntu/CleanDiffuser/D4RL/d4rl/kitchen/adept_envs/franka/kitchen_multitask_v0.py", line 46, in __init__
    super().__init__(
  File "/home/ubuntu/CleanDiffuser/D4RL/d4rl/kitchen/adept_envs/robot_env.py", line 80, in __init__
    super(RobotEnv, self).__init__(
  File "/home/ubuntu/CleanDiffuser/D4RL/d4rl/kitchen/adept_envs/mujoco_env.py", line 62, in __init__
    self.sim_robot = MujocoSimRobot(
  File "/home/ubuntu/CleanDiffuser/D4RL/d4rl/kitchen/adept_envs/simulation/sim_robot.py", line 61, in __init__
    self.sim = dm_mujoco.Physics.from_xml_path(model_file)
  File "/home/ubuntu/anaconda3/envs/cleandiffuser/lib/python3.9/site-packages/dm_control/mujoco/engine.py", line 461, in from_xml_path
    model = wrapper.MjModel.from_xml_path(file_path)
  File "/home/ubuntu/anaconda3/envs/cleandiffuser/lib/python3.9/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 "/home/ubuntu/anaconda3/envs/cleandiffuser/lib/python3.9/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

Code example

import d4rl
import gym
env = gym.make("kitchen-complete-v0")

System Info Describe the characteristic of your environment:

Additional context Add any other context about the problem here.

Checklist

hilookas commented 1 month ago

with mujoco 3.2.0

After change to mujoco 3.1.6/ 3.1.1, all is fine.

hilookas commented 1 month ago

pip install "dm_control<=1.0.20" "mujoco<=3.1.6"