ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I was going to write this on a comment but it was too long, I've used video_stream_opencv once with ROS indigo,
Installed it with sudo apt-get install ros-indigo-video-stream-opencv
And run it on an .avi video as follows:
#check if the input video is fine:
$ rosrun video_stream_opencv test_video_resource.py path_to_your_video/your_video.avi
#run it:
$ roslaunch video_stream_opencv camera.launch video_stream_provider:="path_to_your_video/your_video.avi"
The output topic is /camera/image_raw
, note that you may need to adjust some parameters if needed (fps, frame_id...)
Once you have your topic ready you can record a bag of your video data directly with rosbag record
If your need is images published to a ROS topic, we are already there!
But if you just need the bag file and want a more direct conversion you may make use of this link and this question's answer.
2 | No.2 Revision |
I was going to write this on a comment but it was too long, I've used video_stream_opencv once with ROS indigo,
Installed it with sudo apt-get install ros-indigo-video-stream-opencv
And run it on an .avi video as follows:
#check if the input video is fine:
$ rosrun video_stream_opencv test_video_resource.py path_to_your_video/your_video.avi
#run it:
$ roslaunch video_stream_opencv camera.launch video_stream_provider:="path_to_your_video/your_video.avi"
The output topic is /camera/image_raw
, note that you may need to adjust some parameters if needed (fps, frame_id...)
Once you have your topic ready you can record a bag of your video data directly with rosbag record
If your need is images published to a ROS topic, we are already there!
But if you just need the bag file and want a more direct conversion you may make use of this link and this question's answer.