ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The code proposed by Lorenz did not compile! This is what it should be after fixing the errors:
rosbag::Bag bag("foo.bag");
rosbag::View view(bag);
std::vector<const rosbag::ConnectionInfo *> connection_infos = view.getConnections();
std::set<std::string> topics;
BOOST_FOREACH(const rosbag::ConnectionInfo *info, connection_infos) {
topics.insert(info->topic);
}