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

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:

/rqt_blueview/sonar_max_range

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" />

and

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

Thanks.

edit retag flag offensive close merge delete

Comments

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.

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

2 Answers

Sort by ยป oldest newest most voted
0

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
0

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

Comments

My bet is to start a discussion at https://github.com/ros-visualization/...

130s gravatar image 130s  ( 2015-01-01 19:00:07 -0500 )edit

Question Tools

2 followers

Stats

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

Seen: 1,046 times

Last updated: Apr 21 '14