Rviz: STL marker has missing or transparent faces (prevent culling)
Hi,
I'm publishing an STL file using a Marker message, and while Rviz can load the mesh file correctly, some faces of the mesh are missing. It seems that the faces that as a negative normal are not displayed. In the following images, the mesh correctly visualized on MeshLab (gray) and in Rviz (green).
Is there a config or plugin that can be used to visualize all faces correctly in Rviz?
Update: it seems that this visualization method is called "culling", maybe there is a way to disable it? A temporary solution I came up was publishing two STL files with the normal's flipped to visualize the two sides of the mesh!
The STL file can be downloaded from: https://file.io/I5aP4G4eVtWi
Bottom visualization: The mesh seems fine.
Side visualization: some of the faces are not rendered.
Top visualization: most faces are not rendered.
This is the code I'm using to create the STL marker, nothing out of the ordinary:
visualization_msgs::Marker marker;
marker.header.frame_id = frame_id;
marker.header.stamp = ros::Time::now();
marker.ns = "basic_shapes";
marker.id = 0;
marker.type = visualization_msgs::Marker::MESH_RESOURCE;
marker.mesh_resource = "file:// " + stl_filepath;
marker.action = visualization_msgs::Marker::ADD;