Commit 6286dd38 authored by Carlos Mastalli's avatar Carlos Mastalli

[bugfix] Put back Guilhem commit

parent df3e5429
......@@ -8,13 +8,8 @@ from pinocchio.robot_wrapper import RobotWrapper
def getModelPath(subpath, printmsg=False):
base = '../../../share/example-robot-data'
for p in sys.path:
path = join(p, base.strip('/'))
if exists(join(path, subpath.strip('/'))):
if printmsg:
print("using %s as modelPath" % path)
return path
for path in (dirname(dirname(dirname(dirname(__file__)))), dirname(dirname(dirname(__file__)))):
for path in [dirname(dirname(dirname(dirname(__file__)))),
dirname(dirname(dirname(__file__)))] + [join(p, base.strip('/')) for p in sys.path]:
if exists(join(path, subpath.strip('/'))):
if printmsg:
print("using %s as modelPath" % path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment