ros-visualization / rqt_graph

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

Node Graph Crashing when non-ROS2 DDS Traffic is on the network #47

Open mmatthe opened 4 years ago

mmatthe commented 4 years ago

With latest ROS2 eloquent packages on Ubuntu 18.04

sudo apt-get update && sudo apt-get install --upgrade-only ros-eloquent-\*

The rqt node graph crashes when unrelated DDS traffic is running on the same domain.

How to reproduce:

# Shell 1
$ . /opt/ros/eloquent/setup.bash
$ ros2 run demo_nodes_cpp talker
# Shell 2
$ . /opt/ros/eloquent/setup.bash
$ ros2 run demo_nodes_cpp listener  # Shows the messages from talker
# Shell 3
$ rtiddsping  # from RTI Connext Evaluation package, version 6.0.0
# Shell 4
$ . /opt/ros/eloquent/setup.bash
$ rqt
# Within rqt, select "Plugins->Introspection->Node Graph".
# Then, this occurs in the console:
PluginManager._load_plugin() could not load plugin "rqt_graph/RosGraph":
Traceback (most recent call last):
  File "/opt/ros/eloquent/lib/python3.6/site-packages/qt_gui/plugin_handler.py", line 102, in load
    self._load()
  File "/opt/ros/eloquent/lib/python3.6/site-packages/qt_gui/plugin_handler_direct.py", line 55, in _load
    self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/rqt_gui_py/ros_py_plugin_provider.py", line 64, in load
    return super(RosPyPluginProvider, self).load(plugin_id, ros_plugin_context)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/rqt_gui/ros_plugin_provider.py", line 107, in load
    return class_ref(plugin_context)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/rqt_graph/ros_graph.py", line 193, in __init__
    self._update_rosgraph()
  File "/opt/ros/eloquent/lib/python3.6/site-packages/rqt_graph/ros_graph.py", line 285, in _update_rosgraph
    self._graph.update()
  File "/opt/ros/eloquent/lib/python3.6/site-packages/rqt_graph/rosgraph2_impl.py", line 495, in update
    updated = self._graph_refresh()
  File "/opt/ros/eloquent/lib/python3.6/site-packages/rqt_graph/rosgraph2_impl.py", line 307, in _graph_refresh
    self._node.get_publisher_names_and_types_by_node(name, namespace):
  File "/opt/ros/eloquent/lib/python3.6/site-packages/rclpy/node.py", line 1501, in get_publisher_names_and_types_by_node
    capsule, no_demangle, node_name, node_namespace)
RuntimeError: Failed to get_publisher_names_and_types: node name must not contain characters other than alphanumerics or '_', result: 2, at /tmp/binarydeb/ros-eloquent-rcl-0.8.4/src/rcl/graph.c:62

Even though it's clear that rqt cannot show the extra raw DDS publisher, it should still show the existing ROS Nodes.

dirk-thomas commented 4 years ago

Please consider to contribute a pull request to make the plugin for resilient against this exception.

dirk-thomas commented 4 years ago

@mmatthe I tried to reproduce the problem with Foxy / the current master and Connext 6.0.1. Neither exhibits the RuntimeError for me. Can you please try to reproduce the problem with e.g. the current Foxy packages.

mmatthe commented 4 years ago

@dirk-thomas : We are currently moving to Foxy. Once We have that running, I can check again and let you know.

dirk-thomas commented 4 years ago

@mmatthe Any update on this?