-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STL support #19408
Comments
See also #19055. |
Just got bit by this. Until the issue is resolved, do you have a recommended workflow for doing the conversion? I see there is the stl2obj drake/manipulation/util/BUILD.bazel Line 146 in 316b820
|
I found your converter script using trimesh and adapted it to work for stl as well. Converting all stls and daes to obj fixed the error for me.
There is a bug in the current version of Trimesh that I had to resolve locally to fix meshes that had no associated materials. See mikedh/trimesh#1970 |
FYI I think the points above about giving good, early feedback in case of file type problems are right on point. However, for the particular case of STL files, now that we have VTK packaged well I think it would be a good idea to add direct support for STL files. Possibly that rebalances the priorities here somewhat. |
Given my prior comment, I'm repurposing this issue: The new call to action is either: (1) When given an STL mesh, throw an error with a hyperlink to a troubleshooting guide that convincingly explains how to convert the model file to use a different supported file format -- either OBJ or glTF. Our MuJoCo parser has an epsilon version of this, but we need it for SDFormat / URDF parsers as well, and we still need a guide document for how to convert. (2) Actually parse and support the STL meshes, for all geometry endpoints. (This means Meshcat, Meldis, all RenderEngines, implicit inertia calculations, etc.) Obviously (2) is better if we can swing it. I anticipate it will not be that difficult. |
I also like the idea of a single |
Note: I believe that this could become much easier to support once the in-memory mesh PR train lands. |
I anticipate that the geometry endpoints for all illustration (meshcat, meldis), all proximity, and most rendering (render engine vtk, render engine gltf client) would consume STL natively, without OBJ as an intermediary. I am not sure exactly what the plan would be for render engine gl. The question there would be if we want to eschew vtk entirely from its dependency tree, in which case we'd need to find a standalone STL parser instead of using VTK conversion. Since the MbP would already pull in VTK to read the STL files for the proximity engine, probably using the VTK STL reader for render engine gl will be fine. |
What happened?
In a recent slack coversation a user tried instantiating a model using STL files. They went through the following unhelpful process.
RuntimeError: ProximityEngine: expect an Obj file for non-hydroelastics but get .stl file /workspaces/bdai/ws/install/spot_description/share/spot_description/meshes/base/collision/body_collision.stl) instead.
<drake:compliant_hydroelastic>
RuntimeError: A mesh must contain at least one tetrahedron
<drake:rigid_hydroelastic>
:RuntimeError: hydroelastic::MakeRigidRepresentation(): unsupported mesh file: /workspaces/bdai/ws/install/spot_description/share/spot_description/meshes/base/collision/body_collision.stl
The real problem is:
Proposal:
SceneGraph
should take responsibility for assessingMesh
types upon registration.SceneGraph
should make that clear and direct the user to a drake webpage discussing how to get supported geometry.Some nuances:
SceneGraph's
purview (seeAssignRole()
).SceneGraph
can use?Version
No response
What operating system are you using?
No response
What installation option are you using?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: