ros-visualization / rqt_graph

http://wiki.ros.org/rqt_graph
26 stars 27 forks source link

Different topics shown in rqt_graph as same topic when using namespaces and underscores #11

Closed Ellon closed 7 years ago

Ellon commented 7 years ago

When I use the following launch file:

<launch>
  <!-- launch talker and listener, remmaping 'chatter' to 'myns_chatter' -->
  <node pkg="roscpp_tutorials" type="talker" name="talker1">
    <remap from="chatter" to="myns_chatter"/>
  </node>
  <node pkg="roscpp_tutorials" type="listener" name="listener1">
    <remap from="chatter" to="myns_chatter"/>
  </node>
  <!-- launch talker and listener, without remapping, in a namespace 'myns'. -->
  <node pkg="roscpp_tutorials" type="talker" name="talker2" ns="myns" />
  <node pkg="roscpp_tutorials" type="listener" name="listener2" ns="myns" />
</launch>

I get the following graph in rqt_graph:

rqt_graph_slash_problem

When in fact rostopic list shows that there are two distinct chatter topics, one global prefixed with myns_ and other with myns/ because of the namespace:

$ rostopic list 
/myns/chatter
/myns_chatter
/rosout
/rosout_agg
/statistics

AFAIK they are different topics in ROS, so they should be represented by different topics in rqtgraph, no? Is that any reason to not distinguish / from `` in rqt_graph, or would it be a bug?

I'm using Indigo in Ubuntu 14.04.4 LTS, with packages installed from Ubuntu repositories.

This question was originally posted in ROS Answers.

dirk-thomas commented 7 years ago

Please try the patch proposed in ros-visualization/qt_gui_core#95 and comment if it fixes the problem for you.

Ellon commented 7 years ago

I'll try later this week. Thanks!

dirk-thomas commented 7 years ago

I will go ahead and merge the patch from ros-visualization/qt_gui_core#95.

Ellon commented 7 years ago

Sorry for the late reply. I confirm ros-visualization/qt_gui_core#95 fixed the bug.

rqt_graph_fixed

Thanks for fixing this!