YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarpdatadumper: the YARP data recorder

Acquires and stores Bottles or Images and Videos from a YARP port.

+ Collaboration diagram for yarpdatadumper: the YARP data recorder:

Acquires and stores Bottles or Images and Videos from a YARP port.

Description

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:

[pck id] [time stamp] [bottle content (or image_file_name)]
0 1.234 0 1 2 3 ...
1 1.235 4 5 6 7 ...
... ... ...

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:

Type: [Bottle; | Image; | Image:jpg | Image:png | Depth | DepthCompressed | Image; Video:ext(huffyuv);]
Stamp: [rx; | tx; | tx+rx;]
[local-timestamp] /yarp-port-name [connected]
[local-timestamp] /yarp-port-name [disconnected]
The main, catch-all namespace for YARP.
Definition dirs.h:16

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:

# timecode format v2
0
40
80

This is useful to recover the exact timing while post-processing the video relying for example on the mkvmerge tool:

mkvmerge -o out.mkv --timecodes 0:timecodes.log video.mkv

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.

Libraries

Codec Installation

Parameters

--name portname

--connect portname

--dir dirname

--overwrite

--type datatype

--addVideo

--videoType ext

--downsample n

--rxTime

--txTime

[pck id] [tx stamp] [rx stamp] [message content]

Ports Accessed

The port the service is listening to.

Ports Created

Input Data Files

None.

Output Data Files

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.

Configuration Files

None.

Example

By launching the following command:

yarpdatadumper --name /log --type image --downsample 2

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

yarp connect /grabber /log

the acquisition will start.

By pressing CTRL+C the acquisition is terminated.

So, now, have a look inside the directory ./log

See also
yarpdataplayer: replay recorded data
yarpdatadumperAppGenerator: Generate yarpmanager applications for yarpdatadumper