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

Revision history [back]

click to hide/show revision 1
initial version

Something like this has come up before, the desire to essentially send a "Mesh Message", which has not yet been written.

To work around it with rviz as is, you are almost there. You will need to actually write a brand new file name for each new mesh. Then MeshManager::getByName() will never find your new file to be a duplicate and will always load the new mesh.

Whatever node is publishing the Marker messages and writing the mesh files can also delete each old file. You might leave a buffer of a few mesh files in case rviz gets behind.

This is probably not a very efficient solution, but you said it's not happening all that fast.

Another way to handle it is to use the TRIANGLE_LIST marker type. You would need to write something to pull the triangles out of the mesh, and you couldn't texture it, just set the color of each triangle.

Longer term, it probably makes sense to implement a MeshMarker message for rviz which actually transmits the mesh data right in the message, and thus updates the shape every time.