ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Add published markers to Display in rviz

asked 2016-11-14 08:19:44 -0600

odelay gravatar image

updated 2016-11-14 08:20:06 -0600

Currently I am writing a visualization node that publishes marker topics depending on the parameters given in its launch file. After launching rviz I can then manually add the markers to the display and it works fine.

However for practicability: Is there a way for the node to add these markers to the rviz display itself? I know that one can specify a config file with the displays for rviz. But then the user would have to edit both the launch and config file each time.

edit retag flag offensive close merge delete


I don't quite understand what you're asking: typically, you setup RViz to display markers published to a certain topic, save the config and every user using that config will see all markers published to that topic. Are you using a 1-topic-per-marker approach? That will not scale.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-14 10:59:57 -0600 )edit

Yes I use different topics in order to display the data of separate sensors. That way I can selectively disable and enable the respective markers. Also I can specify the displayed sensors in the launch file. Though I then have to manually add the markers in rviz.

odelay gravatar image odelay  ( 2016-11-14 12:01:26 -0600 )edit

With that approach I don't think there is currently support to change (at least) the RViz side programmatically. It could be done with a custom plugin (in the end, RViz is 'just' a Qt application), but that might be some effort.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-15 02:29:22 -0600 )edit

Would keeping the Marker displays in RViz enabled, but not publishing to the topics achieve what you're after?

Is there a way for the node to add these markers to the rviz display itself?

This is a bit ambiguous: nodes only publish Marker msgs. The RViz display(s) render them.

gvdhoorn gravatar image gvdhoorn  ( 2016-11-15 02:30:16 -0600 )edit

As @gvdhoorn mentioned, Your requirement will be fulfilled by creating a custom rViz Qt Application where you can add all your Publishing Marker nodes to Display (even this you need to specify the published topics in your code the same as you do in Config file or rViz app)

ghkraju gravatar image ghkraju  ( 2016-11-15 03:08:32 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-09-04 16:15:33 -0600

veiko gravatar image

I have made a small plugin that lets you dynamically load, unload, and set config of RViz display plugins via service calls UTNuclearRoboticsPublic/rviz_plugin_manager. Might become handy in what you are trying to achieve.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2016-11-14 08:19:44 -0600

Seen: 1,049 times

Last updated: Nov 14 '16