File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
robot_descriptions/loaders Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -36,19 +36,20 @@ def load_robot_description(
36
36
os .environ .pop ("ROBOT_DESCRIPTION_COMMIT" , None )
37
37
if not hasattr (module , "MJCF_PATH" ):
38
38
raise ValueError (f"{ description_name } is not an MJCF description" )
39
-
39
+
40
40
def load_model_from_path (path ):
41
41
try :
42
42
return mujoco .MjModel .from_xml_path (path )
43
43
except ValueError :
44
44
print (f"{ path } not found. Loading default robot model." )
45
45
return None
46
+
46
47
model_path = module .MJCF_PATH
47
48
if variant is not None :
48
49
path_parts = model_path .split (os .sep )
49
50
path_parts [- 1 ] = f"{ variant } .xml"
50
51
variant_path = os .sep .join (path_parts )
51
52
model = load_model_from_path (variant_path )
52
- if model :
53
+ if model :
53
54
return model
54
- return load_model_from_path (model_path )
55
+ return load_model_from_path (model_path )
You can’t perform that action at this time.
0 commit comments