Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
pinocchio
Commits
13062b03
Commit
13062b03
authored
Mar 30, 2017
by
jcarpent
Browse files
[Python] Use .osg objects if they exist instead of .dae
parent
4a602abe
Changes
1
Hide whitespace changes
Inline
Side-by-side
bindings/python/scripts/robot_wrapper.py
View file @
13062b03
...
...
@@ -17,6 +17,7 @@
import
libpinocchio_pywrap
as
se3
import
utils
import
time
import
os
class
RobotWrapper
(
object
):
...
...
@@ -175,6 +176,12 @@ class RobotWrapper(object):
for
visual
in
self
.
visual_model
.
geometryObjects
:
meshName
=
self
.
viewerNodeNames
(
visual
)
meshPath
=
visual
.
meshPath
# Check if an .osg file exists instead of the .dae version
filename
,
extension
=
os
.
path
.
splitext
(
meshPath
)
if
extension
[
1
:]
==
"dae"
:
filename_osg
=
filename
+
".osg"
if
os
.
path
.
isfile
(
filename_osg
):
meshPath
=
filename_osg
meshTexturePath
=
visual
.
meshTexturePath
meshScale
=
visual
.
meshScale
meshColor
=
visual
.
meshColor
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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