Ask Your Question
0

How to record a video of Turtlebot's view on Gazebo?

asked 2017-06-28 17:30:52 -0500

procyon gravatar image

I'm pretty new to ros, and I'd like to record the view of a turtlebot as it moves around. I want to do it by a python or cpp script, so, not like that: http://learn.turtlebot.com/2015/02/04/4/

Any ideas about how to do it or where to start?

edit retag flag offensive close merge delete

2 Answers

Sort by ┬╗ oldest newest most voted
3

answered 2017-06-28 19:39:43 -0500

jayess gravatar image

Where to start:

Look at the source for the video_recorder node in the image_view package (which is what is used in the tutorial that you linked to). You'll notice that cv::VideoWriter from OpenCV is used. Next, checkout the API for the cv::VideoWriter class. This should be a good start for you.

edit flag offensive delete link more
0

answered 2018-05-30 06:20:13 -0500

kiran gravatar image

You can also look at rosbag. It allows you to record any topic in the bag format. If you are publishing the video on a specific topic you can record that using command line via rosbag record <video/topic>

Moreover, depending on the writing speed of the disk, rosbag may discard the data it needs to write. In such cases, it is suggested to increase the buffer size using rosbag record -b <buffer number in MB> <video/topic>. You can check all the available command line arguments in rosbag command line.

Since it is a command line you always run this using a script and run in even in a remote system. Hope this helps!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2017-06-28 17:30:52 -0500

Seen: 359 times

Last updated: May 30 '18