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

can't import shadowhand.xml into robosuite #450

Open
Charlie0257 opened this issue Jan 20, 2024 · 2 comments
Open

can't import shadowhand.xml into robosuite #450

Charlie0257 opened this issue Jan 20, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Charlie0257
Copy link

Hi, @minhnh

when I try to import right_hand.xml as a gripper into robosuite, it always reports an error:

Traceback (most recent call last):
File "/home/charlie/tempo/robosuite/robosuite/scripts/collect_human_demonstrations.py", line 284, in
env = suite.make(
File "/home/charlie/tempo/robosuite/robosuite/environments/base.py", line 40, in make
return REGISTERED_ENVS[env_name](*args, **kwargs)
File "/home/charlie/tempo/robosuite/robosuite/environments/manipulation/door.py", line 180, in init
super().init(
File "/home/charlie/tempo/robosuite/robosuite/environments/manipulation/manipulation_env.py", line 163, in init
super().init(
File "/home/charlie/tempo/robosuite/robosuite/environments/robot_env.py", line 219, in init
super().init(
File "/home/charlie/tempo/robosuite/robosuite/environments/base.py", line 134, in init
self._load_model()
File "/home/charlie/tempo/robosuite/robosuite/environments/manipulation/door.py", line 296, in _load_model
super()._load_model()
File "/home/charlie/tempo/robosuite/robosuite/environments/manipulation/single_arm_env.py", line 21, in _load_model
super()._load_model()
File "/home/charlie/tempo/robosuite/robosuite/environments/robot_env.py", line 353, in _load_model
self._load_robots()
File "/home/charlie/tempo/robosuite/robosuite/environments/robot_env.py", line 702, in _load_robots
self.robots[idx].load_model()
File "/home/charlie/tempo/robosuite/robosuite/robots/single_arm.py", line 155, in load_model
self.gripper = gripper_factory(self.robot_model.default_gripper, idn=self.idn)
File "/home/charlie/tempo/robosuite/robosuite/models/grippers/gripper_factory.py", line 29, in gripper_factory
return GRIPPER_MAPPINGname
File "/home/charlie/tempo/robosuite/robosuite/models/grippers/shadow_hand.py", line 17, in init
super().init(xml_path_completion("grippers/shadow_hand/right_hand.xml"), idn=idn)
File "/home/charlie/tempo/robosuite/robosuite/models/grippers/gripper_model.py", line 21, in init
super().init(fname, idn=idn)
File "/home/charlie/tempo/robosuite/robosuite/models/base.py", line 496, in init
super().init(fname)
File "/home/charlie/tempo/robosuite/robosuite/models/base.py", line 47, in init
self._replace_defaults_inline(default_dic=default_classes)
File "/home/charlie/tempo/robosuite/robosuite/models/base.py", line 254, in _replace_defaults_inline
self._replace_defaults_inline(default_dic=default_dic, root=child)
File "/home/charlie/tempo/robosuite/robosuite/models/base.py", line 254, in _replace_defaults_inline
self._replace_defaults_inline(default_dic=default_dic, root=child)
File "/home/charlie/tempo/robosuite/robosuite/models/base.py", line 254, in _replace_defaults_inline
self._replace_defaults_inline(default_dic=default_dic, root=child)
File "/home/charlie/tempo/robosuite/robosuite/models/base.py", line 247, in _replace_defaults_inline
tag_attrs = default_dic[cls_name].get(root.tag, None)
KeyError: 'wrist'

Process finished with exit code 1


Could you give me some suggestions?
Thanks for any help!

@zhuyifengzju
Copy link
Contributor

Hi,
In order to use a new XML file, you need to carefully take care of the naming convention. For example, like panda gripper . You either needs to change the shadowhand.xml, or change the naming definition in python class in order to obtain correct result.

@Jonas-Metzger
Copy link

where can I find the naming conventions?

@kevin-thankyou-lin kevin-thankyou-lin added the enhancement New feature or request label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants