"rosbag record" vs "rosbag::Bag"
Hi,
When I usually log kinect and other large data, I use "rosbag::Bag" insted of "rosbag record" command. Because a bag made by "rosbag record" has some timestamp delay and gap. On the other hand, a bag made by "rosbag::Bag" is well-timestamped (even where it log kinect data).
rosbag::Bag bag;
string filename = ros::package::getPath("xxx_bags");
filename.append("/bag/kinect.bag");
bag.open(filename, rosbag::bagmode::Write);
:
bag.write("/topic",stamp,msg);
:
However, it's a little pain to write all nodes. Does someone have any other good tips?