Commit 68539610 authored by Carlos Mastalli's avatar Carlos Mastalli
Browse files

[load] Disable by default the print message

parent bb7ebb10
...@@ -6,16 +6,18 @@ import pinocchio ...@@ -6,16 +6,18 @@ import pinocchio
from pinocchio.robot_wrapper import RobotWrapper from pinocchio.robot_wrapper import RobotWrapper
def getModelPath(subpath): def getModelPath(subpath, printmsg=False):
base = '../../../share/example-robot-data' base = '../../../share/example-robot-data'
for p in sys.path: for p in sys.path:
path = join(p, base.strip('/')) path = join(p, base.strip('/'))
if exists(join(path, subpath.strip('/'))): if exists(join(path, subpath.strip('/'))):
print("using %s as modelPath" % path) if printmsg:
print("using %s as modelPath" % path)
return path return path
for path in (dirname(dirname(dirname(__file__))), dirname(dirname(__file__))): for path in (dirname(dirname(dirname(__file__))), dirname(dirname(__file__))):
if exists(join(path, subpath.strip('/'))): if exists(join(path, subpath.strip('/'))):
print("using %s as modelPath" % path) if printmsg:
print("using %s as modelPath" % path)
return path return path
raise IOError('%s not found' % (subpath)) raise IOError('%s not found' % (subpath))
......
Supports Markdown
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