rosbag reverse
In the C++ API for rosbag, you can open a rosbag and then step forwards through messages using the following loop (taken from the rosbag API website):
BOOST_FOREACH(rosbag::MessageInstance const m, view)
Is there a way to reverse through the messages?
I have tried the following:
for(rosbag::View::iterator iter = view.end(); iter != view.begin(); --iter)
but the compiler complains that ‘class rosbag::View::iterator’ has no member named ‘decrement’
I tried to add a "decrement" function to view.h/cpp in the rosbag API based on the "increment" function, but my C++ isn't good enough to figure out what is going on.
Any suggestions? Thanks, Kyle.