Class GazeboVideoRecorder

Class Documentation

class GazeboVideoRecorder

Supports creating video recordings from a series of frames.

Apart from the simple camera stream, it features:

  • picture-in-picture mode for a second camera stream on top of the main one

  • quadrant mode with 4 camera streams shown in parallel next to each other

  • logging of time metadata

  • width: width of the video recording

  • height: height of the video recording

  • bitRate: bit rate of the video recording

  • logMetadata (optional, defaults to false): flag to indicate whether to write time metadata on the video recording

  • logWallTime (optional, defaults to false): flag to indicate whether to log wall or real time on the video recording (if logMetadata is enabled)

  • addTimestampInFilename (optional, defaults to true): flag to indicate whether to append the start timestamp in the filename of the video recording

Note

Expects the following configuration:

Public Functions

GazeboVideoRecorder(const rclcpp::Node::SharedPtr &node, unsigned int fps, const std::string &ns, const std::string &name = "")
~GazeboVideoRecorder()
void load(const physics::WorldPtr &world, const sdf::ElementPtr &sdf)
void reset()
void setAddTimestampInFilename(bool state)
void start(const boost::filesystem::path &save_path, const std::string &file_timestamp, const common::Time &start_time)
std::string stop(bool discard, std::string filename = "")
void addFrame(const sensors::GvmMulticameraSensor::ImageDataPtr &data_main, const sensors::GvmMulticameraSensor::ImageDataPtr &data_window = nullptr)
void addMultiViewFrame(const sensors::GvmMulticameraSensor::ImageDataPtr &data_tl = nullptr, const sensors::GvmMulticameraSensor::ImageDataPtr &data_tr = nullptr, const sensors::GvmMulticameraSensor::ImageDataPtr &data_bl = nullptr, const sensors::GvmMulticameraSensor::ImageDataPtr &data_br = nullptr)