YARP
Yet Another Robot Platform
Example for controlboardwrapper2 (controlboardwrapper2_basic)

Instantiates controlboardwrapper2 device implemented by ControlBoardWrapper.

+ Collaboration diagram for Example for controlboardwrapper2 (controlboardwrapper2_basic):

Instantiates controlboardwrapper2 device implemented by ControlBoardWrapper.

device controlboardwrapper2
subdevice fakeMotionControl
name /mymotor

[GENERAL]
Joints 16

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

yarpdev --file controlboardwrapper2_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("controlboardwrapper2_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
rootNamestarting '/' if needed./
nameprefix for port namescontrolboard
subdevice
fakeMotionControl.device
fakeMotionControl.wrapped
fakeMotionControl.GENERAL
fakeMotionControl.GENERAL.JointsNumber of degrees of freedom1
fakeMotionControl.GENERAL.AxisMap
fakeMotionControl.GENERAL.AxisName
fakeMotionControl.GENERAL.AxisType
fakeMotionControl.GENERAL.ampsToSensor
fakeMotionControl.GENERAL.fullscalePWM
fakeMotionControl.GENERAL.Encoder
ROS
See also
ControlBoardWrapper