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(
3636 os .environ .pop ("ROBOT_DESCRIPTION_COMMIT" , None )
3737 if not hasattr (module , "MJCF_PATH" ):
3838 raise ValueError (f"{ description_name } is not an MJCF description" )
39-
39+
4040 def load_model_from_path (path ):
4141 try :
4242 return mujoco .MjModel .from_xml_path (path )
4343 except ValueError :
4444 print (f"{ path } not found. Loading default robot model." )
4545 return None
46+
4647 model_path = module .MJCF_PATH
4748 if variant is not None :
4849 path_parts = model_path .split (os .sep )
4950 path_parts [- 1 ] = f"{ variant } .xml"
5051 variant_path = os .sep .join (path_parts )
5152 model = load_model_from_path (variant_path )
52- if model :
53+ if model :
5354 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