2 #include <yarp/os/Stamp.h>
3 #include <yarp/os/Os.h>
9 moduleName=rf.check(
"name",Value(
"stereoCalib"),
"module name (string)").asString().c_str();
10 setName(moduleName.c_str());
13 handlerPortName+=getName(rf.check(
"CommandPort",Value(
"/cmd"),
"Output image port (string)").asString());
17 string dir=rf.getHomeContextPath().c_str();
19 for (
int i=1; proceed; i++)
21 sprintf(dirName,
"%s/%s_%.5d",dir.c_str(),
"calibImg",i);
22 proceed=!yarp::os::stat(dirName);
23 sprintf(dirName,
"%s/%s_%.5d/",dir.c_str(),
"calibImg",i);
25 yarp::os::mkdir_p(dirName);
27 if (!handlerPort.open(handlerPortName.c_str()))
29 cout <<
": unable to open port " << handlerPortName << endl;
60 if (command.get(0).asString()==
"start") {
61 reply.addString(
"Starting Calibration...");
bool respond(const Bottle &command, Bottle &reply)
bool configure(yarp::os::ResourceFinder &rf)