Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wolfgang Merkt
example-robot-data
Commits
68539610
Commit
68539610
authored
Sep 16, 2019
by
Carlos Mastalli
Browse files
[load] Disable by default the print message
parent
bb7ebb10
Changes
1
Show whitespace changes
Inline
Side-by-side
example_robot_data/robots_loader.py
View file @
68539610
...
...
@@ -6,15 +6,17 @@ import pinocchio
from
pinocchio.robot_wrapper
import
RobotWrapper
def
getModelPath
(
subpath
):
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
(
__file__
))),
dirname
(
dirname
(
__file__
))):
if
exists
(
join
(
path
,
subpath
.
strip
(
'/'
))):
if
printmsg
:
print
(
"using %s as modelPath"
%
path
)
return
path
raise
IOError
(
'%s not found'
%
(
subpath
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment