YARP
Yet Another Robot Platform
Example for group (group_basic)

Instantiates group device implemented by DeviceGroup. More...

+ Collaboration diagram for Example for group (group_basic):

Instantiates group device implemented by DeviceGroup.

# Make a motor and camera device.
# Put the motor device on the network.

device group

[part mymotor]
device fakeMotor
axes 10

[part mycam]
device fakeFrameGrabber

[part broadcast]
device controlboardwrapper2
subdevice mymotor
name /mymotor

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

yarpdev --file group_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("group_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
parta list of section names, with each section containing a device
mymotor
mymotor.device
mymotor.wrapped
mymotor.axesnumber of axes to pretend to have4
mymotor.delaydelay in each call for debugging purpose, in ms0
mycam
mycam.device
mycam.wrapped
mycam.widthdesired width of test image320
mycam.heightdesired height of test image240
mycam.horizontalFovdesired horizontal fov of test image1.0
mycam.verticalFovdesired vertical fov of test image2.0
mycam.mirrormirroring disabled by default0
mycam.physFocalLengthPhysical focal length of the fakeFrameGrabber3.0
mycam.focalLengthXHorizontal component of the focal length of the fakeFrameGrabber4.0
mycam.focalLengthYVertical component of the focal length of the fakeFrameGrabber5.0
mycam.principalPointXX coordinate of the principal point of the fakeFrameGrabber6.0
mycam.principalPointYY coordinate of the principal point of the fakeFrameGrabber7.0
mycam.retificationMatrixMatrix that describes the lens' distortion(fake)1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
mycam.distortionModelReference to group of parameters describing the distortion model of the cameraFishEye
mycam.k1Radial distortion coefficient of the lens(fake)8.0
mycam.k2Radial distortion coefficient of the lens(fake)9.0
mycam.k3Radial distortion coefficient of the lens(fake)10.0
mycam.t1Tangential distortion of the lens(fake)11.0
mycam.t2Tangential distortion of the lens(fake)12.0
mycam.freqrate of test images in Hz
mycam.periodperiod of test images in seconds
mycam.modebouncy [ball], scrolly [line], grid [grid], grid multisize [size], random [rand], none [none], time test[time]line
mycam.src
mycam.bayershould emit bayer test image?
mycam.monoshould emit a monochrome image?
broadcast
broadcast.device
broadcast.wrapped
broadcast.rootName
broadcast.name
subdevice
broadcast.ROS
rootNamestarting '/' if needed./
nameprefix for port namescontrolboard
See also
DeviceGroup