Skip to content

Commit cc5429c

Browse files
authored
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 <string topic, string type>, but in the implement the item is a pair of <string topic, string uri> which is conflict with declaration. ref:[ApolloAuto#65]
1 parent 86d9dc6 commit cc5429c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ros/ros_comm/roscpp/src/libros/broadcast_manager.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ void BroadcastManager::registerPublisherCallback(const MsgInfo& result)
156156
{
157157
std::string topic_name = result.get<std::string>(TOPIC_NAME);
158158
std::string pub_uri = result.get<std::string>(XMLRPC_URI);
159+
std::string data_type = result.get<std::string>(TOPIC_TYPE);
159160
pub_cache_[topic_name].insert(pub_uri);
160-
topic_cache_.emplace_back(topic_name, pub_uri);
161+
//topic_cache_.emplace_back(topic_name, pub_uri);
162+
topic_cache_.emplace_back(topic_name, data_type);
161163
publisherUpdate(topic_name);
162164
}
163165

0 commit comments

Comments
 (0)