I am having a problem with ROS rosbag.
I have a python script that generates and publishes messages. I try to record them with rosbag record
but the generated rosbag does not seem to contain the first messages.
I have done the following:
Run the script while in other terminal I have
rostopic echo /the_message
and I can see that all messages are being correctly generated --> so it is not a problem of the scriptRun first (just in case some "initialization time" is needed) in one terminal
rosbag record -O data.bag /the_message
and then in other terminal the script. I got the bag file correctly. But then when playing the bag withrosbag play --clock data.bag
androstopic echo /the_message
in other terminal I got only the messages from the third or fourth message. Never the first message
What could be happening? and How can I ensure the recording takes place including the first messages?