Ask Your Question

Remapping rqt published topics

asked 2013-12-11 05:16:56 -0500

Kevin DeMarco gravatar image

updated 2013-12-15 19:55:27 -0500

tfoote gravatar image

I am developing an rqt GUI plugin to set some values in another node, but the rqt plugins seem to always place a namespace in front of my desired published topic name.

For example, my rqt plugin is called "rqt_blueview," and I declare a published topic in the rqt plugin like this...

this->max_range_pub_ = getNodeHandle().advertise<std_msgs::Float32>("sonar_max_range", 1);

However, the actual topic is published with the following topic name:


I want to publish to /sonar_max_range

I tried to remap the topic, but I can't seem to get it to work. I tried the following in a launch file:

<remap from="/rqt_blueview/sonar_max_range" to="sonar_max_range" />
<node pkg="rqt_blueview" name="rqt_blueview" type="rqt_blueview" />


<remap from="rqt_blueview/sonar_max_range" to="sonar_max_range" />
<node pkg="rqt_blueview" name="rqt_blueview" type="rqt_blueview" />

I tried placing the remap tag inside the <node></node> tags as well, but with no results. I think this has something to do with how the rqt plugin is loaded into the rqt higher-level Qt window.

I was able to remap the subscribed topic /sonar_max_range to /rqt_blueview/sonar_max_range on the normal C++ ROS node subscribed side of the topic, but this naming convention doesn't seem natural to me.

Is there a best practice for naming topics when using rqt plugins? I won't want a launch file remapping the rqt GUI plugins since the idea is to open rqt and then "add" the other rqt plugins to the main window.


edit retag flag offensive close merge delete


A rqt C++ plugin is not a ROS node but a ROS nodelet. Simply because roscpp does not support to run more then a single node per process. A nodelet always runs in a namespace ( ) but should still be remappable.

Dirk Thomas gravatar image Dirk Thomas  ( 2015-04-29 19:35:03 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-04-21 15:27:59 -0500

Yusuke Furuta gravatar image

I also tried to remap a topic of C++ rqt plugins but it didn't work.

When I tried with python rqt pluguins, it worked.
So I think this is a bug of C++ rqt plugin.

edit flag offensive delete link more

answered 2015-01-01 16:41:18 -0500

Andy_H gravatar image

Same here: Using Python, my plugin can call services in the correct namespace, if rqt is launched within the namespace. Doing the same in C++, the services can only be used, if I call them with a global name )):

Any news? Where to post a bugreport for that?

edit flag offensive delete link more


My bet is to start a discussion at

130s gravatar image 130s  ( 2015-01-01 19:00:07 -0500 )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



Asked: 2013-12-11 05:16:56 -0500

Seen: 830 times

Last updated: Apr 21 '14