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

Cannot import name 'postprocess_model_xml' from 'robosuite.utils.mjcf_utils' #15

Open
YujiaLin-523 opened this issue Sep 27, 2024 · 0 comments

Comments

@YujiaLin-523
Copy link

When I prepare for the dataset, I ran this command

python scripts/dataset_states_to_obs.py --dataset 'datasets/playdata/demo_modified.hdf5' --done_mode 0 --camera_names agentview robot0_eye_in_hand --camera_height 84 --camera_width 84 --output_name image_demo_local.hdf5 --exclude-next-obs

but I have the problem with an import error of robosuite. Here is the output of the terminal:

[robosuite WARNING] No private macro file found! (macros.py:53)
[robosuite WARNING] It is recommended to use a private macro file (macros.py:54)
[robosuite WARNING] To setup, run: python /home/glasgow-auto/Project/MimicPlay/robosuite/robosuite/scripts/setup_macros.py (macros.py:55)
Traceback (most recent call last):
  File "scripts/dataset_states_to_obs.py", line 346, in <module>
    dataset_states_to_obs(args)
  File "scripts/dataset_states_to_obs.py", line 151, in dataset_states_to_obs
    env = EnvUtils.create_env_for_data_processing(
  File "/home/glasgow-auto/anaconda3/envs/mimicplay/lib/python3.8/site-packages/robomimic/utils/env_utils.py", line 225, in create_env_for_data_processing
    env_class = get_env_class(env_type=env_type)
  File "/home/glasgow-auto/anaconda3/envs/mimicplay/lib/python3.8/site-packages/robomimic/utils/env_utils.py", line 35, in get_env_class
    from robomimic.envs.env_robosuite import EnvRobosuite
  File "/home/glasgow-auto/anaconda3/envs/mimicplay/lib/python3.8/site-packages/robomimic/envs/env_robosuite.py", line 12, in <module>
    from robosuite.utils.mjcf_utils import postprocess_model_xml
ImportError: cannot import name 'postprocess_model_xml' from 'robosuite.utils.mjcf_utils' (/home/glasgow-auto/Project/MimicPlay/robosuite/robosuite/utils/mjcf_utils.py)

It seems that robosuite (v1.4.1_libero) does not have this attribute. How can I solve this problem?

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