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

Can I use triangle list from RVIZ to display a polygon mesh from PCL?

asked 2018-01-16 09:49:26 -0500

simaopp gravatar image

updated 2018-01-17 04:20:34 -0500

Hello, I am trying to display a polygon mesh in real time in rviz. I am using the mesh from pcl (pcl::PolygonMesh). I believe that the only way is to use the triangle list method but I cant seem to get it to work. Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-01-16 09:58:52 -0500

One way of doing this is to publish the mesh using the a marker message containing a triangle list. There's an example of this in the documentation here. You may need to write your own code to convert from the pcl type to the maker message. This should be fairly straightforward though, you build a list of vertices and a list of colors, each triangle contributes 3 vertices and 1 color to these lists.

edit flag offensive delete link more

Comments

Should I use the geometry_msgs::Point to build the vertices list?

simaopp gravatar image simaopp  ( 2018-01-16 10:20:17 -0500 )edit

Be aware of the various issues with _LIST markers. See the rviz issue tracker (search for triangle or list).

gvdhoorn gravatar image gvdhoorn  ( 2018-01-16 10:48:37 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-01-16 09:49:26 -0500

Seen: 2,061 times

Last updated: Jan 17 '18