The yarprobotinterface is a command line tool that is useful to launch multiple YARP devices at once.
Its name derives from the fact that the first and main use of the yarprobotinterface was used as the main program to provide a network "interface", via YARP Network Server Wrappers (NWS) devices, to a robot.
However, the yarprobotinterface can be used to launch YARP devices of any kind. In a sense, it is an extension of the yarpdev command, that instead can be used only to launch one or two devices, while yarprobotinterface can launch an arbitrary number of YARP devices.
The details of the xml format of the files loaded by yarprobotinterface are documented in YARP robotinterface XML files .
--config ./configdir/config.xml
.xml
file to load and that describes the YARP devices to launch.--portprefix portprefix
--verbose
--dryrun
--enable_tags (xxx yyy ... zzz)
enabled_by
attribute in the xml file. See YARP robotinterface XML files--disable_tags (xxx yyy ... zzz)
disabled_by
attribute in the xml file. See YARP robotinterface XML files--autocloseAfterStart
yarprobotinterface loads the xml file from the location specified in the --config
option.
yarprobotinterface keeps track of the opened devices using an internal storage (a robotDescriptionStorage). This operation is performed automatically by yarprobotinterface, but it is not exposed outside by default. If the user want to access it, it has to instantiate a robotDescription_nws_yarp and attach it to the storage. This can be done adding to the xml configuration a block similar to:
<device name="robotDescriptionNWS" type="robotDescription_nws_yarp"> <param name="local">/yarpRobotInterface/devices/rpc</param> <action phase="startup" level="5" type="attach"> <param name="device"> yriDescriptionStorage </param> </action> <action phase="shutdown" level="5" type="detach" /> </device>
Note that yriDescriptionStorage
is default name of the internal robotDescriptionStorage
and that /yarpRobotInterface/devices/rpc
is the rpc port opened by the nws. A robotDescription_nwc_yarp can be used to connect to the nws device and get list of opened devices and their configuration run-time. An example of such mechanism can be found in yarpmotorgui which by default tries to open a robotDescription_nwc_yarp
to the get a list of all controlBoard_nws_yarp devices in order to connect to he various parts of the robot.
It is highly recommended that every device opened by yarprobotinterface derives from interface yarp::dev::IDeviceDriverParams, which is automatically present if the device parameters parser has been generated with the tool yarpDeviceParamParserGenerator. By doing so, yarprobotinterface will be able to access also to the device configuration parameters, exposing them to external application for inspection.
If this interface is not available, yarprobotinterface will generate a warning yarp::dev::IDeviceDriverParams not available
in the startup phase, but it will continue its normal execution.
A run-time generated list of the devices opened by yarprobotinterface can by obtained by the command line tool yarpRobotDescriptionInfo: A tool to inspect YARP devices used by yarprobotinterface which also generates a graphical connection map of them.