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
Stack Of Tasks
pinocchio
Commits
774b743d
Commit
774b743d
authored
Mar 31, 2020
by
Matthieu Vigne
Browse files
[python] Issue warning when trying to display geometric primitives without HPP-FCL.
parent
59f55346
Changes
2
Hide whitespace changes
Inline
Side-by-side
bindings/python/pinocchio/visualize/gepetto_visualizer.py
View file @
774b743d
...
...
@@ -91,6 +91,10 @@ class GepettoVisualizer(BaseVisualizer):
if
WITH_HPP_FCL_BINDINGS
and
isinstance
(
geometry_object
.
geometry
,
hppfcl
.
ShapeBase
):
success
=
self
.
loadPrimitive
(
meshName
,
geometry_object
)
else
:
if
meshName
==
""
:
msg
=
"Display of geometric primitives is supported only if pinocchio is build with HPP-FCL bindings."
warnings
.
warn
(
msg
,
category
=
UserWarning
,
stacklevel
=
2
)
return
success
=
gui
.
addMesh
(
meshName
,
meshPath
)
if
not
success
:
return
...
...
bindings/python/pinocchio/visualize/meshcat_visualizer.py
View file @
774b743d
...
...
@@ -68,11 +68,13 @@ class MeshcatVisualizer(BaseVisualizer):
return
obj
def
loadMesh
(
self
,
geometry_object
):
import
meshcat.geometry
# Mesh path is empty if Pinocchio is built without HPP-FCL bindings
if
geometry_object
.
meshPath
==
""
:
msg
=
"Display of geometric primitives is supported only if pinocchio is build with HPP-FCL bindings."
warnings
.
warn
(
msg
,
category
=
UserWarning
,
stacklevel
=
2
)
return
None
# Get file type from filename extension.
...
...
Write
Preview
Markdown
is supported
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