iCub-main
main.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 iCub Facility - Istituto Italiano di Tecnologia
3  * Author: Ugo Pattacini
4  * email: ugo.pattacini@iit.it
5  * Permission is granted to copy, distribute, and/or modify this program
6  * under the terms of the GNU General Public License, version 2 or any
7  * later version published by the Free Software Foundation.
8  *
9  * A copy of the license can be found at
10  * http://www.robotcub.org/icub/license/gpl.txt
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15  * Public License for more details
16 */
17 
18 #include <yarp/os/all.h>
19 
20 #include "module.h"
21 
22 using namespace yarp::os;
23 
24 
25 /****************************************************************/
26 int main(int argc, char *argv[])
27 {
28  Network yarp;
29 
30  ResourceFinder rf;
31  rf.setDefaultContext("depth2kin");
32  rf.setDefaultConfigFile("config.ini");
33  rf.setDefault("calibrationFile","calibration_data.ini");
34  rf.configure(argc,argv);
35 
36  int test=rf.check("test",Value(-1)).asInt32();
37  if (test<0)
38  {
39  if (!yarp.checkNetwork())
40  {
41  yError("YARP server not available!");
42  return 1;
43  }
44  }
45 
46  CalibModule mod;
47  return mod.runModule(rf);
48 }
49 
50 
51 
int main(int argc, char *argv[])
Definition: main.cpp:31
Copyright (C) 2008 RobotCub Consortium.