Open psigen opened 9 years ago
This issue also occurs with empty STL files, such as the following:
https://www.dropbox.com/s/whja8woux0xk4i8/empty.stl?dl=0
what(): OGRE EXCEPTION(2:InvalidParametersException): No data defined to convert to a mesh. in ManualObject::convertToMesh at /build/buildd/ogre-1.8-1.8.1+dfsg/OgreMain/src/OgreManualObject.cpp (line 782)
I can easily fix this for .iv
files. These are not natively supported by RViz, so we load the mesh using OpenRAVE and convert it to a TRIANGLE_LIST
type. I can simply skip the conversion if indices
is empty. I will add this check.
Unfortunately, this isn't as easy for .stl
files. We pass these directly to RViz using the MESH_RESOURCE
type without ever loading them in OpenRAVE. We would have to load the model from disk in OpenRAVE just to do this check.
I'm not sure if it's worth it to add the .stl
check for a few reasons:
or_rviz
.dae
files, which will also most likely crash RViznone
geometry type (https://github.com/rdiankov/openrave/pull/306)The none
geometry type is pretty useless for the case of having collision-only trimesh geometry. It seems to only be useful for links that have no geometry at all.
I agree that fixing this for STLs might be something we have to send upstream.
You're right. none
solves the opposite problem (render geometry, but no collision geometry).
My understanding was that qtcoin
and or_rviz
only rendered visual meshes and did not fall back on rendering primitive objects (e.g. https://github.com/personalrobotics/or_urdf/issues/5). That doesn't seem to the case, so I need to look into that bug. Maybe we can use the same trick to avoid using empty mesh files. :smile:
when the user adds a "RobotModel" display, what happens in RVIZ when the URDF includes an empty .stl
file as visual geometry?
@mklingen: I'm not sure, it either loads nothing or falls back on a collision mesh. I guess it makes sense to try and keep the same logic here.
The attached
empty.iv
file, when loaded in or_rviz, crashes OGRE when used as a render mesh. It works fine in OpenRAVE'sqtcoin
viewer.https://gist.github.com/psigen/19d7fe6d9c8d5c824a3d