Commit 26cd0b4f authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

gepetto visualizer: explicit error message if GV is not installed

parent 2130f9b7
Pipeline #11828 passed with stage
in 181 minutes and 12 seconds
......@@ -25,7 +25,15 @@ class GepettoVisualizer(BaseVisualizer):
def initViewer(self, viewer=None, windowName="python-pinocchio", sceneName="world", loadModel=False):
"""Init GepettoViewer by loading the gui and creating a window."""
import gepetto.corbaserver
try:
import gepetto.corbaserver
except ImportError:
import warnings
msg = ("Error while importing the viewer client.\n"
"Check whether gepetto-viewer is properly installed"
)
warnings.warn(msg, category=UserWarning, stacklevel=2)
try:
self.viewer = gepetto.corbaserver.Client() if viewer is None else viewer
gui = self.viewer.gui
......
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