YARP
Yet Another Robot Platform
Talking to the ROS parameter server

YARP has no special support for the ROS parameter server, but can communicate with it via its network API.

Here is a command-line example:

yarp rpc /ros
>>setParam /demo foo 15
Response: 1 "parameter /foo set" 0
>>getParam /demo foo
Target disappeared, reconnecting...
Response: 1 "Parameter [/foo]" 15

From code, you could use a Bottle:

Network yarp;
Contact ros = Network::queryName("/ros");
printf("ROS available as %s\n", ros.toURI().c_str());
// set a parameter called "foo" to 15
Bottle cmd, reply;
cmd.addString("setParam");
cmd.addString("/demo");
cmd.addString("foo");
cmd.addInt32(15);
Network::write(ros,cmd,reply);
printf("reply to setParam is: %s\n", reply.toString().c_str());
// read "foo" back
cmd.clear();
cmd.addString("getParam");
cmd.addString("/demo");
cmd.addString("foo");
Network::write(ros,cmd,reply);
printf("reply to getParam is: %s\n", reply.toString().c_str());
printf("Stored value is hopefully %d\n", reply.get(2).asInt32());
return 0;

This should give:

ROS available as xmlrpc://127.0.0.1:11311
reply to setParam is: 1 "parameter /foo set" 0
reply to getParam is: 1 "Parameter [/foo]" 15
Stored value is hopefully 15
yarp::os::Bottle::addString
void addString(const char *str)
Places a string in the bottle, at the end of the list.
Definition: Bottle.cpp:173
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::sig::file::write
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
Definition: ImageFile.cpp:971