Skip to content
Snippets Groups Projects
Commit 13062b03 authored by jcarpent's avatar jcarpent
Browse files

[Python] Use .osg objects if they exist instead of .dae

parent 4a602abe
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment