28 #include <image_transport/image_transport.h>
29 #include <cv_bridge/cv_bridge.h>
30 #include <sensor_msgs/image_encodings.h>
31 #include <opencv2/imgproc/imgproc.hpp>
32 #include <opencv2/highgui/highgui.hpp>
37 #include <Eigen/Dense>
39 #include "rosbag/bag.h"
40 #include <rosbag/view.h>
41 #include <boost/foreach.hpp>
43 #include <std_msgs/String.h>
44 #include <std_msgs/Int32.h>
47 using namespace Eigen;
53 bag.open(
"test.bag", rosbag::bagmode::Read);
55 std::vector<std::string> topics;
56 topics.push_back(std::string(
"chatter"));
57 topics.push_back(std::string(
"numbers"));
59 rosbag::View view(bag, rosbag::TopicQuery(topics));
61 BOOST_FOREACH(rosbag::MessageInstance
const m, view)
63 std_msgs::String::ConstPtr s = m.instantiate<std_msgs::String>();
67 std_msgs::Int32::ConstPtr i = m.instantiate<std_msgs::Int32>();