ARISE-Initiative / robosuite

robosuite: A Modular Simulation Framework and Benchmark for Robot Learning
https://robosuite.ai
Other
1.22k stars 393 forks source link

can't import shadowhand.xml into robosuite #450

Open Charlie0257 opened 7 months ago

Charlie0257 commented 7 months ago

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 commented 7 months ago

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 commented 3 months ago

where can I find the naming conventions?