mapviz icon indicating copy to clipboard operation
mapviz copied to clipboard

unable to subscribe to topic with MarkerArray messages under ROS 2 Galactic

Open crystal-butler opened this issue 3 years ago • 1 comments

I'm trying to use the Marker plugin with a Mapviz install under ROS 2 Galactic to display MarkerArray messages, but am getting the following error:

[mapviz-1] [ERROR] [1648669993.058815599] [mapviz]: Unhandled RCLError in Qt event loop: could not create subscription: failed to create topic, at /tmp/binarydeb/ros-galactic-rmw-cyclonedds-cpp-0.22.4/src/rmw_node.cpp:2552, at /tmp/binarydeb/ros-galactic-rcl-3.1.2/src/rcl/subscription.c:105

I had an earlier installation of Mapviz under ROS 2 Eloquent that was able to subscribe to the same topic and messages I'm attempting to visualize under Galactic. I reran colcon build on the publisher package under Galactic and confirmed that the messages were publishing with the command ros2 topic echo /poi_marker_array visualization_msgs/msg/MarkerArray. Any thoughts on whether this is a problem with Mapviz or with my publisher, or additional troubleshooting tips?

crystal-butler avatar Mar 30 '22 20:03 crystal-butler

Sorry for such a late reply, but this appears to be caused by multiple subscriptions with the same name:

https://github.com/swri-robotics/mapviz/blob/ros2-devel/mapviz_plugins/src/marker_plugin.cpp#L126

I tested this by commenting out the Marker subscription and was able to subscribe to MarkerArray. This will likely need to be handled in a different way than it currently is (potentially just by looking up the type of the topic)

agyoungs avatar May 23 '22 05:05 agyoungs