ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 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());
    }
}