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

Duke's profile - activity

2017-03-16 14:35:17 -0500 received badge  Famous Question (source)
2016-08-02 10:12:31 -0500 received badge  Notable Question (source)
2016-03-01 09:22:38 -0500 received badge  Popular Question (source)
2016-03-01 03:04:45 -0500 commented answer read single message from bag-file (c++)

thanks for your answer. I think the filter functionality also iterates over the whole bag and looking for one element is already a kind of filter. its working but it feels not right to search the whole file just to get one special element.

2016-02-29 07:30:34 -0500 asked a question read single message from bag-file (c++)

Hi,I'm new to this whole ROS stuff and have a problem which I can't solve on my own.

I want to read a single message from a given bag-file using c++11. To do this I read the short tutorial and cookbook for rosbag. I get the message with iterating over all messages in the bag. But I want to know if there is a way to direct get the specified message (data)? The topic (m.getTopic()), timestamp (m.getTime()) and the structure of the message (m.MessageDefinition()) is known.

Thanks for your help.