RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.35k stars 1.27k forks source link

drake visualizer has normals flipped for box primitives #9827

Closed RussTedrake closed 6 years ago

RussTedrake commented 6 years ago

our current manipulation_station example uses a lot of box primitives for visualizing the station, etc. and I've been noticing that the normals on the box primitive, as rendered through the drake_visualizer interface are consistently bad. so far, it's only made for aesthetic problems, but now I'm trying to manipulate boxes and the objects often dissappear into the table / surrounding structure.

This is the station viewed from a nominal (human-relevant) viewing angle. It's supposed to be a table with 80-2 vertical trusses. But the closest leg is disappearing into the base (+ other artifacts)

screenshot-2018-10-27_10 32 56

this is the same station, viewed from a slightly lower camera angle (but still above the table/ground). now you can see that there was actually a "foam brick" on the table the entire time. it was just being hidden by the visualization artifacts.

screenshot-2018-10-27_10 33 19

you can also see into the sides of the table surface, which should be a solid box. is there a reason that this might have changed? vtk version bump?

EricCousineau-TRI commented 6 years ago

Running //examples/manipulation_station:proof_of_life on my machine on current master (81352d8) did not indicate odd normals:

image

Perhaps this is specific to how the box primitives are making it in? Do you have a reproduction model + script that it's easy to run (perhaps a pydrake script using ConnectDrakeVisualzier + an SDF file)?

Also, is the alpha value set to 1.0? (I believe Z order drawing gets weird when it's not purely opaque...)

RussTedrake commented 6 years ago

Nice call! The alpha values were 0.9. Setting them to 1.0 has resolved it. You rock.

cc @pangtao22 , @Sproulx -- let's be sure to use alpha = 1.0 from now on.