Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Gazebo Multi Camera Monitor Plugin
Description: This tutorial presents the gazebo multi camera monitor pluginTutorial Level: BEGINNER
Next Tutorial: Gazebo Multi View Monitor Plugin
Contents
The gazebo multi-camera monitor plugin records videos with a multi-camera setup. See the gif above (the video was created automatically; no editing was done).
An arbitrary number of cameras can be set up, from which the plugin can select and configure the video stream. The cameras can be updated dynamically during the recording. Time metadata can be logged in the videos as well.
The plugin exposes two ROS services to control the recordings:
Use the start_recording service to initiate a recording. You can optionally specify the cameras with which to initialize the video stream.
rosservice call /gazebo/start_recording "{cameras: {names: []}}"
Use the stop_recording service to save or discard a recording. The filename must be given without the extension (.mp4). The recording is saved in the directory defined in the plugin configuration.
rosservice call /gazebo/stop_recording "{discard: false, filename: navigation-test}"
Publish a message to the camera_select topic to update the video stream. You can specify one or two cameras for the main and window view, respectively.
rostopic pub /gazebo/camera_select gazebo_video_monitor_msgs/Strings "{names: [camera_0, camera_2]}"
See an example configuration of the plugin in gazebo_multi_camera_monitor_plugin.world.