ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I used this to add topics of a certain type to a GUI selector:
ros::master::V_TopicInfo ti;
if(ros::master::getTopics(ti)) {
for(ros::master::V_TopicInfo::iterator it = ti.begin(); it != ti.end(); it++) {
if(it->datatype == _topicType)
ui.topicsList->addItem(it->name.c_str());
}
}