Is there any way to view the collision models with Drake Visualizer without simply copying the model in the visual tag? I was trying to use a mesh as a collision model and I am unable to get collisions working with it.
Asked
Active
Viewed 174 times
1 Answers
3
A couple of key points:
- General meshes cannot be used for contact. The best you can hope for is using a
convex
mesh. Here's an example of the specification in an sdf. Here's the corresponding example in a urdf. They're both very similar.- It's worth emphasizing that the mesh must truly be convex; it won't be checked but lying will produce unexpected results.
- If you're using
drake_visualizer
as your visualizer, you most likely have a call toConnectDrakeVisualizer
. That takes an optional argument where you can request it to visualize the collision (akaRole::kProximity
) instead of the default visual (akaRole::kIllustration
).

Sean Curtis
- 1,425
- 7
- 8
-
Thank you for the quick response! Declaring the mesh as convex totally worked! Is there any good way to visualize the collison models in drake visualizer? – Alex Tacescu Jul 07 '20 at 15:05
-
What Sean mentioned in point (2) should get you what you want - visualizing (only) the collisions by specifying `ConnectDrakeVisualizer(..., Role::kProximity)`. Have you had a chance to give that a whirl? – Eric Cousineau Jul 08 '20 at 02:31
-
Is there a way to dynamically change the Role without having to set another scenegraph? I'd like to go back and forth between the contact model and the visual model while the simulation is on-going – Alex Tacescu Jul 10 '20 at 17:15
-
Not currently. But the drake_visualizer implementation will go through a minor overhaul this quarter and I'm thinking about tweaking that -- making it easier to do exactly that. I'll post a link to an issue discussing proposals here. – Sean Curtis Jul 13 '20 at 13:35
-
See new Drake issue: https://github.com/RobotLocomotion/drake/issues/13673 – Sean Curtis Jul 13 '20 at 13:57