File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
robot_descriptions/loaders Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,15 @@ def load_robot_description(
5353 module = import_module (f"robot_descriptions.{ description_name } " )
5454 if commit is not None :
5555 os .environ .pop ("ROBOT_DESCRIPTION_COMMIT" , None )
56- robot = pin .RobotWrapper .BuildFromURDF (
57- filename = module .URDF_PATH ,
58- package_dirs = get_package_dirs (module ),
59- root_joint = root_joint ,
60- )
56+ if hasattr (module , "URDF_PATH" ):
57+ robot = pin .RobotWrapper .BuildFromURDF (
58+ filename = module .URDF_PATH ,
59+ package_dirs = get_package_dirs (module ),
60+ root_joint = root_joint ,
61+ )
62+ elif hasattr (module , "MJCF_PATH" ):
63+ robot = pin .RobotWrapper .BuildFromMJCF (
64+ filename = module .MJCF_PATH ,
65+ root_joint = root_joint ,
66+ )
6167 return robot
You can’t perform that action at this time.
0 commit comments