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

How to get number of messages in one topic from rosbag.py

$
0
0
Hello! I was wondering whether with the Python module rosbag there is any chance to get the number of recorded messages in one topic. The Bag.read_messages method returns a generator and of course I could iterate over all messages and count. But is there a way to tell the number in advance? That way I could preallocate the right amount of lists to handle the messages. Thank you!

Viewing all articles
Browse latest Browse all 475

Trending Articles



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