Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 475

Viewing sensor_msgs/Image while using rosbag API

$
0
0
I'm using the rosbag API to sequentially process messages in a bag file. Some of these messages are images (of the type `sensor_msgs/Image`). Is there an image viewing package that has an API that allows me to pass it an image of that type, and it will show the image? More specifically, I'm looking to do this: // Specify topics to be read std::vector topics; topics.push_back(imu_topic); topics.push_back(camera_topic); rosbag::View view(bag, rosbag::TopicQuery(topics)); // Loop through messages BOOST_FOREACH(rosbag::MessageInstance const m, view) { if (m.getTopic() == camera_topic) { sensor_msgs::Image::ConstPtr image = m.instantiate(); if (image != NULL) { // CALL A FUNCTION TO VIEW IMAGE } } }

Viewing all articles
Browse latest Browse all 475

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>