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

Robot XML:unknown default class name #648

Open
shockstove opened this issue Mar 5, 2025 · 0 comments
Open

Robot XML:unknown default class name #648

shockstove opened this issue Mar 5, 2025 · 0 comments

Comments

@shockstove
Copy link

System Info

Robosuite=1.5.1
Ubuntu

Information

the problem is when I run

# create environment instance
env = suite.make(
    env_name="Lift", # try with other tasks like "Stack" and "Door"
    robots="Baxter",  # try with other robots like "Sawyer" and "Jaco"
    has_renderer=True,
    has_offscreen_renderer=False,
    use_camera_obs=False,
)

# reset the environment
env.reset()

for i in range(1000):
    action = np.random.randn(*env.action_spec[0].shape) * 0.1
    env.step(action)  # take action in the environment
    env.render()  # render on display

the output like

  File "/home/robin/anaconda3/envs/multi/lib/python3.10/site-packages/robosuite/robots/fixed_base_robot.py", line 67, in load_model
    super().load_model()
  File "/home/robin/anaconda3/envs/multi/lib/python3.10/site-packages/robosuite/robots/robot.py", line 223, in load_model
    self.robot_model.set_mujoco_model()
  File "/home/robin/anaconda3/envs/multi/lib/python3.10/site-packages/robosuite/models/robots/robot_model.py", line 87, in set_mujoco_model
    self.mujoco_model = self.get_model()
  File "/home/robin/anaconda3/envs/multi/lib/python3.10/site-packages/robosuite/models/base.py", line 145, in get_model
    model = mujoco.MjModel.from_xml_string(string.getvalue())
ValueError: XML Error: unknown default class name 'robot0_viz'
Element 'geom', line 105

Besides, some robots from robosuite_models also have the same problem"unknown default class name xxx".

If you could give some help I will be very greatful!

Reproduction

# create environment instance
env = suite.make(
    env_name="Lift", # try with other tasks like "Stack" and "Door"
    robots="Baxter",  # try with other robots like "Sawyer" and "Jaco"
    has_renderer=True,
    has_offscreen_renderer=False,
    use_camera_obs=False,
)

# reset the environment
env.reset()

for i in range(1000):
    action = np.random.randn(*env.action_spec[0].shape) * 0.1
    env.step(action)  # take action in the environment
    env.render()  # render on display

Expected behavior

No response

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

1 participant