Ask Your Question
1

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: http://ogre3d.org/tikiwiki/Creating+d...

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

Comments

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

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

1 Answer

Sort by ยป oldest newest most voted
2

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

lucasw gravatar image

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

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.

edit flag offensive delete link more

Comments

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 imagemikepurvis ( 2016-02-22 20:16:49 -0600 )edit

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

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

Cool :)

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 1,105 times

Last updated: Nov 29 '17