Convert a Video to a Rosbag
Hi,
I have recorded a Video with 60 FPS on a Smartphone. I now want to use this in ROS. Therefore I like to convert that into a Rosbag. (If you have a other idea I'm open to it)
But I didn't find any solution to this. (Here are only Ideas and its a few years old answersROS)
I can make a rosbag, but I actually have no Idea how I can stream the video file into a Ros topic. (I like to use it with SVO)
Edit: I'm working with ROS Indigo on Ubuntu 14.04
Thanks for Help
Maybe you can use gscam to play the video and rosbag the output topic (which I believe to be camera/image_raw). Follow this tutorial: http://wiki.ros.org/video_player
Or you could do it with python. First you figure out how you can iterate over your images with OpenCV, then use
cv_bridge
to create the ROS message of typesensor_msgs/Image
and then use the rosbag API to write to a bag file. http://wiki.ros.org/rosbag/Code%20API@Dimitri I sadly have no experience with python, I was more looking for a finished solution. @DavidN Nice Idea! I tried it, but I forget to mention that I work with ROS Indigo, with this I couldnt get it running. I saw it should be possible but I didn't managed it.