Closed Ethan-Chen-plus closed 4 days ago
you can go to https://github.com/NVlabs/mimicgen repo, they have updated the dataset.
Thanks a lot. I have got the dataset. But an error occurs:
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
File /data/ckw/micromamba/envs/sdp/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py:92, in _call_target(_target_, _partial_, args, kwargs, full_key)
91 try:
---> 92 return _target_(*args, **kwargs)
93 except Exception as e:
File /data/ckw/07robo/04sdp/SDP/diffusion_policy/env_runner/robomimic_image_runner.py:218, in RobomimicImageRunner.__init__(self, output_dir, dataset_path, shape_meta, n_train, n_train_vis, train_start_idx, n_test, n_test_vis, test_start_seed, max_steps, n_obs_steps, n_action_steps, render_obs_key, fps, crf, past_action, abs_action, tqdm_interval_sec, n_envs)
216 env_init_fn_dills.append(dill.dumps(init_fn))
--> 218 env = AsyncVectorEnv(env_fns, dummy_env_fn=dummy_env_fn)
219 # env = SyncVectorEnv(env_fns)
File /data/ckw/07robo/04sdp/SDP/diffusion_policy/gym_util/async_vector_env.py:102, in AsyncVectorEnv.__init__(self, env_fns, dummy_env_fn, observation_space, action_space, shared_memory, copy, context, daemon, worker)
101 dummy_env_fn = env_fns[0]
--> 102 dummy_env = dummy_env_fn()
103 self.metadata = dummy_env.metadata
File /data/ckw/07robo/04sdp/SDP/diffusion_policy/env_runner/robomimic_image_runner.py:127, in RobomimicImageRunner.__init__.<locals>.dummy_env_fn()
126 def dummy_env_fn():
--> 127 robomimic_env = create_env(
128 env_meta=env_meta,
129 shape_meta=shape_meta,
130 enable_render=False
131 )
132 return MultiStepWrapper(
133 VideoRecordingWrapper(
134 RobomimicImageWrapper(
(...)
153 max_episode_steps=max_steps
154 )
File /data/ckw/07robo/04sdp/SDP/diffusion_policy/env_runner/robomimic_image_runner.py:33, in create_env(env_meta, shape_meta, enable_render)
31 ObsUtils.initialize_obs_modality_mapping_from_dict(modality_mapping)
---> 33 env = EnvUtils.create_env_from_metadata(
34 env_meta=env_meta,
35 render=False,
36 render_offscreen=enable_render,
37 use_image_obs=enable_render,
38 )
39 return env
File /data/ckw/07robo/04sdp/robomimic_pkg/robomimic/utils/env_utils.py:218, in create_env_from_metadata(env_meta, env_name, render, render_offscreen, use_image_obs)
216 env_kwargs = env_meta["env_kwargs"]
--> 218 env = create_env(
219 env_type=env_type,
220 env_name=env_name,
221 render=render,
222 render_offscreen=render_offscreen,
223 use_image_obs=use_image_obs,
224 **env_kwargs,
225 )
226 check_env_version(env, env_meta)
File /data/ckw/07robo/04sdp/robomimic_pkg/robomimic/utils/env_utils.py:169, in create_env(env_type, env_name, render, render_offscreen, use_image_obs, **kwargs)
168 env_class = get_env_class(env_type=env_type)
--> 169 env = env_class(
170 env_name=env_name,
171 render=render,
172 render_offscreen=render_offscreen,
173 use_image_obs=use_image_obs,
174 postprocess_visual_obs=True,
175 **kwargs,
176 )
177 print("Created environment with name {}".format(env_name))
File /data/ckw/07robo/04sdp/robomimic_pkg/robomimic/envs/env_robosuite.py:93, in EnvRobosuite.__init__(self, env_name, render, render_offscreen, use_image_obs, postprocess_visual_obs, **kwargs)
92 self._init_kwargs = deepcopy(kwargs)
---> 93 self.env = robosuite.make(self._env_name, **kwargs)
95 if self._is_v1:
96 # Make sure joint position observations and eef vel observations are active
File /data/ckw/07robo/04sdp/robosuite_pkg/robosuite/environments/base.py:35, in make(env_name, *args, **kwargs)
34 if env_name not in REGISTERED_ENVS:
---> 35 raise Exception(
36 "Environment {} not found. Make sure it is a registered environment among: {}".format(
37 env_name, ", ".join(REGISTERED_ENVS)
38 )
39 )
40 return REGISTERED_ENVS[env_name](*args, **kwargs)
Exception: Environment Square_D0 not found. Make sure it is a registered environment among: Lift, Stack, NutAssembly, NutAssemblySingle, NutAssemblySquare, NutAssemblyRound, PickPlace, PickPlaceSingle, PickPlaceMilk, PickPlaceBread, PickPlaceCereal, PickPlaceCan, Door, Wipe, ToolHang, TwoArmLift, TwoArmPegInHole, TwoArmHandover, TwoArmTransport
The above exception was the direct cause of the following exception:
InstantiationException Traceback (most recent call last)
Cell In[15], line 1
----> 1 workspace.run()
File /data/ckw/07robo/04sdp/SDP/diffusion_policy/workspace/train_diffusion_transformer_hybrid_workspace.py:126, in TrainDiffusionTransformerHybridWorkspace.run(self)
124 # env_runner3: BaseImageRunner
125 for i in range(cfg.task_num):
--> 126 env_runners.append(hydra.utils.instantiate(cfg[f'task{i}'].env_runner, output_dir=self.output_dir))
127 assert isinstance(env_runners[i], BaseImageRunner)
130 # configure logging
File /data/ckw/micromamba/envs/sdp/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py:222, in instantiate(config, *args, **kwargs)
219 _convert_ = config.pop(_Keys.CONVERT, ConvertMode.NONE)
220 _partial_ = config.pop(_Keys.PARTIAL, False)
--> 222 return instantiate_node(
223 config, *args, recursive=_recursive_, convert=_convert_, partial=_partial_
224 )
225 elif OmegaConf.is_list(config):
226 # Finalize config (convert targets to strings, merge with kwargs)
227 config_copy = copy.deepcopy(config)
File /data/ckw/micromamba/envs/sdp/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py:339, in instantiate_node(node, convert, recursive, partial, *args)
334 value = instantiate_node(
335 value, convert=convert, recursive=recursive
336 )
337 kwargs[key] = _convert_node(value, convert)
--> 339 return _call_target(_target_, partial, args, kwargs, full_key)
340 else:
341 # If ALL or PARTIAL non structured, instantiate in dict and resolve interpolations eagerly.
342 if convert == ConvertMode.ALL or (
343 convert == ConvertMode.PARTIAL
344 and node._metadata.object_type in (None, dict)
345 ):
File /data/ckw/micromamba/envs/sdp/lib/python3.9/site-packages/hydra/_internal/instantiate/_instantiate2.py:97, in _call_target(_target_, _partial_, args, kwargs, full_key)
95 if full_key:
96 msg += f"\nfull_key: {full_key}"
---> 97 raise InstantiationException(msg) from e
InstantiationException: Error in call to target 'diffusion_policy.env_runner.robomimic_image_runner.RobomimicImageRunner':
Exception('Environment Square_D0 not found. Make sure it is a registered environment among: Lift, Stack, NutAssembly, NutAssemblySingle, NutAssemblySquare, NutAssemblyRound, PickPlace, PickPlaceSingle, PickPlaceMilk, PickPlaceBread, PickPlaceCereal, PickPlaceCan, Door, Wipe, ToolHang, TwoArmLift, TwoArmPegInHole, TwoArmHandover, TwoArmTransport')
full_key: task0.env_runner
How to solve it? Thanks for your helping!!
oops! It seems new version do not have squre_d0 dataset, you can modify the dataset used in config.yaml, I will also check if I can find the orginal data link.
Thanks a lot. I use this script: https://github.com/NVlabs/mimicgen/blob/main/mimicgen/scripts/download_datasets.py
python download_datasets.py --dataset_type core --tasks coffee_d0 coffee_preparation_d0 hammer_cleanup_d0 kitchen_d0 mug_cleanup_d0 nut_assembly_d0 pick_place_d0 square_d0 stack_d0 stack_three_d0 threading_d0 three_piece_assembly_d0
It seemed to be ok and I can see the dataset. Also I changed the dataset path: It can smoothly generate Zarr.
However this still occurs:
InstantiationException: Error in call to target 'diffusion_policy.env_runner.robomimic_image_runner.RobomimicImageRunner':
Exception('Environment Square_D0 not found. Make sure it is a registered environment among: Lift, Stack, NutAssembly, NutAssemblySingle, NutAssemblySquare, NutAssemblyRound, PickPlace, PickPlaceSingle, PickPlaceMilk, PickPlaceBread, PickPlaceCereal, PickPlaceCan, Door, Wipe, ToolHang, TwoArmLift, TwoArmPegInHole, TwoArmHandover, TwoArmTransport')
full_key: task0.env_runner
Thanks. I need your help please.
Hello! I'm here to ask whether you have solved it and could you please give me more infomation for how to use the download_dataset.py or generate more config for the data? Or maybe I've used the wrong version. I sincerely need your help.@AnthonyHuo
@AnthonyHuo Thanks a lot. This issue has been solved. Here: https://github.com/NVlabs/mimicgen/issues/41 https://github.com/ARISE-Initiative/robomimic/issues/205
@AnthonyHuo Thanks a lot. This issue has been solved. Here: https://github.com/NVlabs/mimicgen/issues/41 https://github.com/ARISE-Initiative/robomimic/issues/205
I've submitted the Request access, please.