0

I am trying to convert a video to bagfile(.bag). I found this question: How do I convert a video or a sequence of images to a bag file? and implemented the solution https://stackoverflow.com/a/38093683/6938984. However when I play it with rosrun play bagfile.bag , it gives this error:

Error: Index entry for topic camera/image_raw contains invalid time. This message will not be loaded.

How can I solve this?

Thank you.

Yunus Emre
  • 29
  • 1
  • 6

1 Answers1

0

Please try to fix it using ROS built-in tools

rosbag check
rosbag fix
Lukashou-AGH
  • 125
  • 10
  • Thanks for reply @Lukashou-AGH. I handled chancing stamp line as `stamp = rospy.Time.from_sec(time.time())`. It is now not occured. However, the map is empty too like previous situation. Gives: > W1216 15:57:10.268883 24281 map-builder-flow.cc:101] Map is empty; nothing will be saved. Do you have any suggestion? – Yunus Emre Dec 16 '19 at 13:00
  • I suggest you to fix rosbag or record it again, because otherwise you have to deal with this issue in code of all nodes you are using, in this case I assume it's a _map_server_. – Lukashou-AGH Dec 16 '19 at 15:18