Rosanswers logo


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. Bottom visualization

Side visualization: some of the faces are not rendered. Side visualization

Top visualization: most faces are not rendered. Top visualization

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;

Originally posted by h3ct0r on ROS Answers with karma: 21 on 2020-08-03

Post score: 0


1 Answer 1


Rosanswers logo

Ended up publishing 2 meshes: one with the normals flipped and other without the normals flipped. This way the mesh can be seen from any angle.

Originally posted by h3ct0r with karma: 21 on 2022-03-25

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.