Acquires and stores Bottles or Images and Videos from a YARP port.
Acquires and stores Bottles or Images and Videos from a YARP port.
When launched, the service monitors the presence of incoming data (bottles,images,etc.) and stores it within a folder called with the same name as the service port (or with a proper suffix appended if other data is present in the current path). In this folder the file 'data.log' contains the information (taken from the envelope field of the port) line by line as follows:
Note that if the envelope is not valid, then the Time Stamp is the reference time of the machine where the service is running. Anyway, a selection between these two Time Stamps is available for the user through –rxTime option.
Moreover, a file called 'info.log' is produced containing information about the data type stored within the 'data.log' file as well as the logged time stamps and the name of the yarp ports connected or disconnected to the dumper, as in the following:
Finally, a further file called 'timecodes.log' is also generated together with the video, which contains the timecode associated to each frame given in millisecond precision. The file content looks like the following:
This is useful to recover the exact timing while post-processing the video relying for example on the mkvmerge
tool:
To get mkvmerge do: sudo apt-get install mkvtoolnix
The module yarpdataplayer: replay recorded data can be used to re-play a dump generated by the yarpdatadumper: the YARP data recorder.
--name portname
portname
identifies the name of the listening port open by the service; if not specified /dump
is assumed. The leading forward slash will be added if not provided.--connect portname
portname
specifies the name of the port to connect the dumper to at launch time (tcp is used).--dir dirname
dirname
serves to specify the storage directory explicitly (relative to the location where the module has been launched from).--overwrite
--type datatype
datatype
selects the type of items to be stored. It can be one of the following (if not specified bottle is assumed):--addVideo
ext
is determined by the option videoType
. This option is available if OpenCV is found and the codec huffyuv is installed in the system.--videoType ext
ext
specifies the type of the video container employed. Available types are: mkv (default), avi.--downsample n
n
, i.e. the parameter n
specifies how many items (bottles or images) shall be skipped after one acquisition.--rxTime
--rxTime
is not selected, the receiver time will be taken as reference in case of invalid message envelope.--txTime
txTime
is given in conjunction with the rxTime
option (or even if rxTime
is not selected but the sender stamp is invalid), then the following format will be adopted for the logged data:The port the service is listening to.
<portname>
(e.g. /dump)<portname>/rpc
which is a remote procedure call port useful to shut down the service remotely by sending to this port the 'quit' command.None.
Within the directory ./<portname>
the file data.log
is created containing the acquisitions. Besides, if image type has been selected, all the acquired images are also stored. A further file called info.log
is also produced containing meta-data relevant for the logging.
Note that in case an acquisition with the same <portname>
was previously carried out, an increasing suffix will be appended to the name of the directory.
None.
By launching the following command:
the service will create the listening port /log
capable of storing images within the subdirectory ./log
at a halved rate with respect to the rate of the sender.
Then, by connecting the port to the sender with the usual yarp command
the acquisition will start.
By pressing CTRL+C
the acquisition is terminated.
So, now, have a look inside the directory ./log