write msg in .bag at specific time
Hey guys,
How can I create a .bag file and specify the intervall of a message? When I'm doing that like in the rosbag API:
bag = rosbag.Bag('test.bag', 'w')
#write to .bag function
{
s = Imu()
bag.write('/chatter', s)
}
while 's' is an e.g. sensor_msgs/Imu. When I Increment the s.header.stamp.secs by 1, the message isnt published every second. In my specific case that write-function is called e.g. in an intervall of five seconds and I want to write the data in an intervall of one second instead of 5. The Message is going to be published just every fifth second.
Does anybody has a clue whats going on there?
Best
Occooni