diff --git a/python/example_robot_data/robots_loader.py b/python/example_robot_data/robots_loader.py index a8399ae8a15c4f5669a4f64709fb0cf0a933aea6..018e317495e5c46bee274d5483e64b4459ed06c2 100644 --- a/python/example_robot_data/robots_loader.py +++ b/python/example_robot_data/robots_loader.py @@ -58,6 +58,7 @@ class RobotLoader(object): has_rotor_parameters = False free_flyer = False verbose = False + model_path = None def __init__(self): if self.urdf_filename: @@ -71,7 +72,8 @@ class RobotLoader(object): builder = RobotWrapper.BuildFromSDF except AttributeError: raise ImportError("Building SDF models require pinocchio >= 3.0.0") - self.model_path = getModelPath(df_path, self.verbose) + if self.model_path is None: + self.model_path = getModelPath(df_path, self.verbose) self.df_path = join(self.model_path, df_path) self.robot = builder(self.df_path, [join(self.model_path, '../..')], pin.JointModelFreeFlyer() if self.free_flyer else None)