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

Dynamic texture in rviz?

asked 2016-02-22 06:50:26 -0600

updated 2016-02-22 06:50:58 -0600

Hey all,

I'm looking at building an rviz plugin which would display the state of OTTO's programmable LED strip. I'm pretty sure I don't want to create 300+ new pieces of single-colour geometry, so I'm wondering about the feasibility of supplying a single geometry for the strip as a whole, and then texturing it at runtime from a plugin.

I found some info on doing this in Ogre here:

But I'm wanting to get a general sanity check on what the pitfalls are going to be with this approach. How possible is it to mix native Ogre calls in with rviz's geometry? Is there another plugin which demonstrates something like what I'm wanting to do here?

edit retag flag offensive close merge delete


Hi mikepurvis, were u succesfull to do the dynamic texturing part(i.e texturing at runtime)??

natsu gravatar image natsu  ( 2017-07-21 20:58:50 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-22 07:59:52 -0600

lucasw gravatar image

updated 2017-11-29 10:39:14 -0600


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:

Video example of a webcam on a quad inside rviz:

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

edit flag offensive delete link more


Thanks for the response! It's animation, so it'll definitely need to an in-memory texture, but I'll definitely use this as a starting point.

mikepurvis gravatar image mikepurvis  ( 2016-02-22 20:16:49 -0600 )edit

I just found this: - I've updated it to work in Kinetic with Qt5 ( ). It looks to be working with the test script (I also fixed that up). Did you get anything working you can share?

lucasw gravatar image lucasw  ( 2016-10-23 20:13:53 -0600 )edit

Cool :)

William gravatar image William  ( 2016-10-27 14:16:59 -0600 )edit

Question Tools



Asked: 2016-02-22 06:50:26 -0600

Seen: 2,242 times

Last updated: Nov 29 '17