/**
\page yarpdataplayer yarpdataplayer: replay recorded data

\ingroup yarp_guis
\ingroup yarp_tools

\tableofcontents

A module that reproduces in a synchronized way, previously acquired data
(using \ref yarpdatadumper) from a source of input.

\section yarpdataplayer_intro Description

This module provides the user a simple but informative
user-interface in order to manipulate the previously acquired data.
When playing it uses the timestamps provided from the time of acquisition
to synchronize the sending of the data as if the robot was present.

\image html datasetplayer.jpg
\image latex datasetplayer.jpg "The yarpdataplayer GUI running on Windows" width=6cm

\section yarpdataplayer_lib Libraries

- OpenCV libraries.
- GTKMM or Qt5 libraries.

\section yarpdataplayer_running Running

yarpdataplayer can run with or without the GUI (for server use and
commands are sent via the rpc port)
For gui run normally `yarpdataplayer`.
Without GUI run with the extra parameter \e hidden:

\verbatim
  yarpdataplayer --hidden
\endverbatim

\section yarpdataplayer_file yarpdatadumper file example

yarpdatadumper data.log file example:

\verbatim
  9566    1324373535.040288   -2.32967 0.043956 1.450549 -0.56044 1.704894 4.136408
  etc...
\endverbatim

yarpdatadumper info.log file example:

\verbatim
  Type: Bottle;
  [1324373535.040288] /foo/state:o [connected]
  etc...
\endverbatim

\e Type: is used to identify what kind of data the player is
   required to send.

\e The names of the ports open up by the player are initially
   set up based on the content of info.log file. This can be
   then changed using the GUI.

\section yarpdataplayer_parameters Parameters

\verbatim
--hidden
\endverbatim
- run with or without gui

\verbatim
--withExtraTimeCol index
\endverbatim
- loads the log files created by the datadumper with both rx and tx time.
  The user must select which timestamp to use (txTime index = 1 or
  rxTime index = 2)

\verbatim
--name modName
\endverbatim
- The parameter \e modName identifies the stem-name of the open
  ports.

\section yarpdataplayer_portsif Ports Interface

The interface to this module is implemented through
\ref dataSetPlayer_IDL.

- The ports belonging to each of the parts are dynamically created and
  can be changed using the GUI.

\section yarpdataplayer_in_files Input Data Files

The player will look, in a recursive way, into directories in order to
create the parts needed and retrieve the data.

The data name is the default \ref yarpdatadumper "yarpdatadumper" names: data.log and
info.log.

An example directory tree containing data (data.log+info.log)
can be:

\code
/experiment1/
             /head/data.log;info.log
             /torso/data.log;info.log;
             /images/leftCamera/data.log;info.log
             /images/rightCamera/data.log;info.log
             /left_leg/data.log;info.log
             /right_leg/data.log;info.log
\endcode

If the directory indicated is either `experiment1` or within experiment,
the player will successfully load all required data.

The parts name will be taken from each subdirectory of the `/experiment1`
forder.

\section yarpdataplayer_ros Topic/ros compatibility

Yarpdataplayer allows also to reproduce topics which can be subscribed by ROS nodes.
For example, you can record a topic (e.g. /mytopic+@/mynode) as a standard yarp port using the Bottle format provided by yarpdatadumper. The Bottle format is needed because
yarpdatadumper is currently not able to automatically detect the type of the incoming messages. 
After the recording, you have to manually edit the info.log file created by yarpdatadumper and replace the type Bottle with the type of the ROS message you want to publish.
For example, if you want to publish a sensor_msgs/LaserScan ROs Message, replace Bottle with sensor_msgs/LaserScan.
That's all. When Yarpdataplayer plays the recorded data, it will open the /mytopic+@/mynode port and will publish LaserScan data. The corresponding topic will be visible also by ROS. 


\note Currently, if the directory selected is (in this example) head,
torso etc, the player will not load the files as it will not be able to
find subdirs.

\todo
 - main slider bar selection. This needs an on-click and on-release
   event in order not to interfere with update and playback
 - when the search for a directory has not provided anything (user
   selected directory containing only *.log files)

\sa \ref yarpdatadumper
\sa \ref yarpdataplayer_example
\sa \ref yarpdataplayer_rec_example

*/
