YARP
Yet Another Robot Platform
Example for grabberDual (grabber_basic)

Instantiates grabberDual device implemented by ServerGrabber. More...

+ Collaboration diagram for Example for grabberDual (grabber_basic):

Instantiates grabberDual device implemented by ServerGrabber.

# start up a network wrapper around a fakeFrameGrabber
device grabberDual
subdevice fakeFrameGrabber
width 640
height 480
period 0.25
name /grabber

If this text is saved in a file called grabber_basic.ini then the device can be created by doing:

yarpdev --file grabber_basic.ini

Of course, the configuration could be passed just as command line options, or as a yarp::os::Property object in a program:

Property p;
p.fromConfigFile("grabber_basic.ini");
// of course you could construct the Property object on-the-fly
PolyDriver dev;
dev.open(p);
if (dev.isValid()) { /* use the device via view method */ }

Here is a list of properties checked when starting up a device based on this configuration file. Note that which properties are checked can depend on whether other properties are present. In some cases properties can also vary between operating systems. So this is just an example

PROPERTYDESCRIPTIONDEFAULT
device
periodrefresh period(in ms) of the broadcasted values through yarp ports
subdevicename of the subdevice to use as a data source
left_config
right_config
twoCamerasif true ServerGrabber will open and handle two devices, if false only one
splitset 'true' to split the streaming on two different ports
capabilitiestwo capabilities supported, COLOR and RAW respectively for rgb and raw streaming
no_dropif present, use strict policy for sending data
stampif present, add timestamps to data
single_threadedif present, operate in single threaded mode
namename of port to send data on/grabber
See also
ServerGrabber