ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Rviz trying to display shape_msgs Mesh

asked 2015-12-11 11:03:22 -0500

Hi There,

I've created a ROS node that uses a lidar scanner and a pan tilt unit to create 3d scans. These scans are published by the node as shape_msgs::Mesh messages. I was hoping to be able to visualize these meshes live in Rviz as they are created. But they don't seem to be supported by Rvis V1.11.10 in Ros Indigo.

Is there a message type for a mesh that does work in rviz? Ideally I'd like to be able to display texture mapped meshes but I can't find a standard message type that supports that?

At some point soon I'll be needing to display a 3D terrain map in Rvis to if that's possible?

Thanks, Pete

edit retag flag offensive close merge delete


Could you just use a triangle list type and sort the vertices in your shape_msgs Mesh so they are correctly ordered for the triangle list?

2ROS0 gravatar image 2ROS0  ( 2015-12-11 15:24:42 -0500 )edit

Hi there. Yes I have used the triangle list. Because the data is being generated live so the last thing I want to do is save it to a file. The messages a huge since vertices have to be repeated many times. But colouring the triangles is a bonus. Thanks

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2015-12-17 10:16:39 -0500 )edit

Can you please tell me how can you create the triangle list to display on rviz?

simaopp gravatar image simaopp  ( 2018-01-16 09:45:25 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2015-12-11 12:17:25 -0500

William gravatar image

I think you want a Mesh Marker:

edit flag offensive delete link more


Doesn't this type require a mesh file and so can this be done real-time?

2ROS0 gravatar image 2ROS0  ( 2015-12-11 15:22:14 -0500 )edit

You're right this would require them to write each mesh out to a file. I think the triangle list is a better approach, as you commented above.

William gravatar image William  ( 2015-12-11 15:42:53 -0500 )edit

Yup. Thanks. I've used a triangle list in the end

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2015-12-17 10:29:24 -0500 )edit

answered 2016-02-08 07:52:11 -0500

lucasw gravatar image

updated 2016-02-08 07:53:02 -0500

This rviz plugin displays shape_msgs::Mesh and can have a texture projected over it (though haven't gotten the texture working yet), I don't know how good it is for large vertice lists:

I forked it from on the suggestion of the answer to and got rid of the most everything except that plugin.

edit flag offensive delete link more

Question Tools



Asked: 2015-12-11 11:03:22 -0500

Seen: 2,550 times

Last updated: Feb 08 '16