Update
I have an rviz plugin that subscribes to an image topic and allows the user to specify the scale and the tf that the image ought to be aligned to:
https://github.com/lucasw/rviz_textur...
Video example of a webcam on a quad inside rviz:
https://www.youtube.com/watch?v=RzT0t...
I've tested it in jade and kinetic.
It was forked from another project that adapted code and made a standalone version of the texture mesh code from vigir_ocs_rviz_plugins mentioned below.
It uses a texture projection method rather than (the probably simpler) dynamic texturing above, but could be generalized to have non-rectangular shapes to project onto (like provide a mesh via a Marker or some other message).
Old answer
Rviz: Display image in 3D scene had a suggestion to use a custom mesh display plugin developed for the DRC by the Vigir team.
I attempted just that https://github.com/lucasw/vigir_ocs_c... but haven't gotten it working (but also haven't spent much time on it). They also had a forked rviz that some of the nodes in the original repo needed, hopefully not this one too.
The point of the plugin was to project a texture onto an arbitrary mesh, which is cool, but overkill for you and that other question- a custom plugin that just creates a textured quad at a rviz property defined tf and size and updates the texture via Image topic would be great.
Take a look at any rviz plugin and it is all raw Ogre inside them. The pitfalls are that code lives in a plugin environment, so rviz has control of global settings and making the main calls to Ogre which have to be respected, and it is possible to do screwy things within a plugin that mess up rendering in the entirety of rviz.
I imagine performance is poor, but if your state doesn't change that quickly it maybe is sufficient to load a textured mesh in a standard mesh resource rviz Marker, and updating the texture on disk and resending the Marker as needed from another node.
marti_visualization_msgs/TexturedMarker is only for mapviz, at first I thought there was an rviz plugin to show it.
Hi mikepurvis, were u succesfull to do the dynamic texturing part(i.e texturing at runtime)??