Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
movie_publisher::MovieToBag Class Reference

Convert movie files and their metadata to ROS bag file. More...

#include <movie_to_bag.h>

Inheritance diagram for movie_publisher::MovieToBag:
Inheritance graph
[legend]

Public Member Functions

 MovieToBag (const cras::LogHelperPtr &log)
 
virtual cras::expected< void, std::string > open (const std::string &bagFilename, const std::string &transport, const std::string &movieFilename, const cras::BoundParamHelperPtr &params)
 Open the given movie file for reading and bag file for writing. More...
 
virtual cras::expected< void, std::string > run ()
 Run the conversion. More...
 
- Public Member Functions inherited from cras::NodeWithOptionalMaster
::cras::BoundParamHelperPtr getPrivateParams () const
 
void init (const ::ros::M_string &remappings, const ::std::string &name, uint32_t options)
 
void init (const ::ros::VP_string &remappings, const ::std::string &name, uint32_t options)
 
void init (int &argc, char **argv, const ::std::string &name, uint32_t options)
 
bool isInitialized () const
 
 NodeWithOptionalMaster (const ::cras::LogHelperPtr &log)
 
bool ok () const
 
::std::string resolveName (const ::std::string &name, bool remap=true) const
 
void shutdown ()
 
bool usesMaster () const
 
virtual ~NodeWithOptionalMaster ()
 
- Public Member Functions inherited from cras::HasLogger
::cras::LogHelperConstPtr getCrasLogger () const
 
 HasLogger (const ::cras::LogHelperPtr &log)
 
void setCrasLogger (const ::cras::LogHelperPtr &log)
 

Protected Member Functions

virtual std::shared_ptr< MovieToBagMetadataProcessorcreateMetadataProcessor (const std::string &bagFilename, const std::string &transport, const cras::BoundParamHelperPtr &params)
 
virtual std::unique_ptr< MovieReaderRoscreateReader (const cras::BoundParamHelperPtr &params)
 

Protected Attributes

std::shared_ptr< MovieToBagMetadataProcessormetadataProcessor
 
MoviePtr movie
 The opened movie. More...
 
std::unique_ptr< MovieReaderRosmovieReader
 The movie reader. More...
 
- Protected Attributes inherited from cras::HasLogger
::cras::LogHelperPtr log
 

Detailed Description

Convert movie files and their metadata to ROS bag file.

Stored topics

To extract the additional topics except movie, the node uses instances of MetadataExtractor.

To change the prefix of all topics, set ~topic parameter. To change the name of a single topic, remap it.

Parameters

Parameters ~start, ~end and ~duration can be expressed in seconds (15.35), in (min, sec), in (hour, min, sec), or as a string: ‘'01:03:05.35’`.

Definition at line 146 of file movie_to_bag.h.

Constructor & Destructor Documentation

◆ MovieToBag()

movie_publisher::MovieToBag::MovieToBag ( const cras::LogHelperPtr log)
explicit
Parameters
[in]logLogger.

Member Function Documentation

◆ createMetadataProcessor()

virtual std::shared_ptr<MovieToBagMetadataProcessor> movie_publisher::MovieToBag::createMetadataProcessor ( const std::string &  bagFilename,
const std::string &  transport,
const cras::BoundParamHelperPtr params 
)
protectedvirtual

◆ createReader()

virtual std::unique_ptr<MovieReaderRos> movie_publisher::MovieToBag::createReader ( const cras::BoundParamHelperPtr params)
protectedvirtual

◆ open()

virtual cras::expected<void, std::string> movie_publisher::MovieToBag::open ( const std::string &  bagFilename,
const std::string &  transport,
const std::string &  movieFilename,
const cras::BoundParamHelperPtr params 
)
virtual

Open the given movie file for reading and bag file for writing.

Parameters
[in]bagFilenameThe bag filename.
[in]transportThe image transport to use for saving movie frames.
[in]movieFilenameThe movie file.
[in]paramsROS parameters.
Returns
Nothing or error.

Processed ROS parameters:

  • verbose (bool, default false): Whether to print progress messages.
  • topic (string, default 'movie'): Base name of the topic with movie frames (without transport suffix).

◆ run()

virtual cras::expected<void, std::string> movie_publisher::MovieToBag::run ( )
virtual

Run the conversion.

Returns
Nothing or error.

Member Data Documentation

◆ metadataProcessor

std::shared_ptr<MovieToBagMetadataProcessor> movie_publisher::MovieToBag::metadataProcessor
protected

Definition at line 184 of file movie_to_bag.h.

◆ movie

MoviePtr movie_publisher::MovieToBag::movie
protected

The opened movie.

Definition at line 183 of file movie_to_bag.h.

◆ movieReader

std::unique_ptr<MovieReaderRos> movie_publisher::MovieToBag::movieReader
protected

The movie reader.

Definition at line 182 of file movie_to_bag.h.


The documentation for this class was generated from the following file:


movie_publisher
Author(s): Martin Pecka
autogenerated on Wed May 28 2025 02:07:22