/**
\page yarpmotorgui yarpmotorgui: move the joints of a robot

\ingroup yarp_guis
\ingroup yarp_tools

\tableofcontents

A simple graphical interface for moving all the joints of a robot with
sliders.
Uses remote control boards.

\image html yarpmotorgui.jpg
\image latex yarpmotorgui.jpg "A window of yarpmotorgui running on Linux" width=15cm

\section yarpmotorgui_intro Description

This GUI can be used for the following pouposes:

- continuosly reading the position of the ALL the robot joints
- running/idling single joints
- running ALL the robot joints
- position command of single joints
- changing the velocity of the position commands
- performing sequences of position commands with the ALL robot joints
- calibrating single joints
- checking if the robot is in position ("@")

\section yarpmotorgui_parameters Parameters

\code
--robot:    name of the robot (used to form port names)
--parts:    a list of parts to be added.
--skip:     skips the initial dialog and keeps the default parts.
--speed:    enables the speed visualisation.
--calib:    enables the calib buttons.
--debug:    opens the debugInterfaceClient (for firmware debugging).
--direct:   enables the position direct mode.
--openloop: enables the openloop mode.
--admin:    enables all the previous parameters (debug, direct, openloob, calib).
\endcode
Example:
\code
yarpmotorgui --robot icub --parts (head torso left_arm right_arm left_leg right_leg)
\endcode

These parameters can be specified in a single file, passed with the
--from option.
Example:
\code
yarpmotorgui --from yarpmotorgui.ini
\endcode

By default yarpmotorgui starts using the file yarpmotorgui.ini
in \c $ICUB_ROOT/app/default.

Home positions are obtained directly by the robot as specified in the Calibrator
settings of the robot.
It is nevertheless possible to specify custom configurations which can be executed by the corresponding menu action in the "Custom positions" submenu (present in both the Global Joints commands menu and in the single part Commands menu).
A (multiple) custom position can be defined in the yarpmotorgui configuration file with the following syntax:
\code
[customPosition_{CUSTOM_POSITION_NAME}]
{FULL_ROBOT_PART_NAME}_Position   0             0             0                  0             0             0
{FULL_ROBOT_PART_NAME}_Velocity                10            10            10                10            10            10
\endcode

where {CUSTOM_POSITION_NAME} is the unique name associated to the custom configuration and
{FULL_ROBOT_PART_NAME} is the name which fully specifies the robot part, e.g. "/icub/torso".
Note that both Position and Velocity elements must be present, and the number of joints must match the the number of axes for the part.
The following is an example of custom configuration

\code
[customPosition_OnChair]
/icub/head_Position            0             0             0   	      0	            0  	       0
/icub/head_Velocity            10            10            10            10            10         10
/icub/torso_Position           0             0             0
/icub/torso_Velocity           10            10            10
/icub/left_arm_Position      -90.00         11.0000       80.00         15.00         0.00          0.00          0.00
/icub/left_arm_Velocity       10            10            10            10            10            10            10
/icub/right_arm_Position      -90.00         11.0000       80.00         15.00        -0.00          0.00         -0.00
/icub/right_arm_Velocity       10            10            10            10            10            10            10
/icub/right_leg_Position      84.00         12            0            -87.00         0.00          0
/icub/right_leg_Velocity      10            10            10            10            10            10
/icub/left_leg_Position            84.00         12            0            -87.00         0.00          0
/icub/left_leg_Velocity            10            10            10            10            10            10
\endcode


A set of calibration parameters can be optionally defined in the
supplied file. These calibration parameters follow the same standard
followed by the \ref icub_iCubInterface and can be specified within
the group [part_calib] (e.g. [head_calib]):
\code
[head_calib]
CalibrationType     0          0        0         0          0          0
Calibration1    500.0      1000.0    900.0     300.0     1333.0     1333.0
Calibration2     20.0        20.0     20.0     -20.0        5.0        5.0
Calibration3      0.0         0.0      0.0       0.0        0.0        0.0
\endcode

A set of parameters can be optionally specified in order to
open a set of tabs which allow cartesian movements trough the cartesian
interfaces (see the tutorial \ref icub_cartesian_interface). These cartesian
interfaces can be enabled by inserting a group [cartesian] in the
yarpmotorgui initialization file. This group should contain the name
of the robot parts which should be controlled in the cartesian space:
\code
[cartesian]
left_arm
...
right_leg
\endcode
Each part initialized with the cartesian interface should be properly
configured by specifying the limits for the cartesian workspace.
\code
[left_arm_workspace]
xmin xm
xmax xM

ymin ym
ymax yM

zmin zm
zmax zM
\endcode
In order to make the cartesian tabs working you need to be sure that
that the \ref iKinCartesianSolver "Cartesian Solvers" are running and working.

\section yarpmotorgui_portsa Ports Accessed
For each part initialized (e.g. right_leg):
- /icub/right_leg/rpc:i
- /icub/right_leg/command:i
- /icub/gui/right_leg/state:i

\section yarpmotorgui_portsc Ports Created
For each part initialized (e.g. right_leg):
- /icub/gui/right_leg/rpc:o
- /icub/gui/right_leg/command:o
- /icub/right_leg/state:o

\section yarpmotorgui_conf_file Configuration Files

Passed with the parameter --from, configure the layout of the gui.
\code
robot icub
parts (head torso right_arm left_arm)
\endcode

Creates a gui. Connects automatically to:

\code
/icub/head/*
/icub/torso/*
/icub/right_arm/*
...
\endcode

*/
