Rosanswers logo

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


Originally posted by Kevin DeMarco on ROS Answers with karma: 88 on 2013-12-11

Post score: 2

Original comments

Comment by Dirk Thomas on 2015-04-29:
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 (http://wiki.ros.org/nodelet) but should still be remappable.


1 Answer 1


Rosanswers logo

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.

Originally posted by Yusuke Furuta with karma: 28 on 2014-04-21

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.