From 012c8f917417733e3ef43fdbe17cea531e4b4d82 Mon Sep 17 00:00:00 2001 From: liangtengteng Date: Fri, 1 Jun 2018 13:24:03 +0800 Subject: [PATCH] fix ros::master::getTopics() getting worng results The declaration of ros::master::getTopic says that each item in the result of ros::master::getTopics should be a pair , but in the implement the item is a pair of which is conflict with declaration. --- ros/ros_comm/roscpp/src/libros/broadcast_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ros/ros_comm/roscpp/src/libros/broadcast_manager.cpp b/ros/ros_comm/roscpp/src/libros/broadcast_manager.cpp index 999aedf..45f60f3 100644 --- a/ros/ros_comm/roscpp/src/libros/broadcast_manager.cpp +++ b/ros/ros_comm/roscpp/src/libros/broadcast_manager.cpp @@ -156,8 +156,9 @@ void BroadcastManager::registerPublisherCallback(const MsgInfo& result) { std::string topic_name = result.get(TOPIC_NAME); std::string pub_uri = result.get(XMLRPC_URI); + std::string data_type = result.get(TOPIC_TYPE); pub_cache_[topic_name].insert(pub_uri); - topic_cache_.emplace_back(topic_name, pub_uri); + topic_cache_.emplace_back(topic_name, data_type); publisherUpdate(topic_name); }