iCub-main
predict.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007-2010 RobotCub Consortium, European Commission FP6 Project IST-004370
3  * author: Arjan Gijsberts
4  * email: arjan.gijsberts@iit.it
5  * website: www.robotcub.org
6  * Permission is granted to copy, distribute, and/or modify this program
7  * under the terms of the GNU General Public License, version 2 or any
8  * later version published by the Free Software Foundation.
9  *
10  * A copy of the license can be found at
11  * http://www.robotcub.org/icub/license/gpl.txt
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details
17  */
18 
19 #include <iostream>
20 #include <string>
21 
22 #include <yarp/os/Network.h>
23 #include <yarp/os/ResourceFinder.h>
24 
28 
29 using namespace iCub::learningmachine;
30 
31 int main (int argc, char* argv[]) {
32  yarp::os::Network yarp;
33  int ret;
34 
35  yarp::os::ResourceFinder rf;
36  rf.setDefaultContext("learningMachine");
37  rf.configure(argc, argv);
38 
39  PredictModule module;
40  try {
41  // initialize catalogue of machine factory
43 
44  // initialize catalogue of event listeners
46 
47  ret = module.runModule(rf);
48  } catch(const std::exception& e) {
49  std::cerr << "Error: " << e.what() << std::endl;
50  std::cerr << "Type 'quit' or CTRL+C to exit." << std::endl;
51  module.close();
52  return 1;
53  } catch(char* msg) {
54  std::cerr << "Error: " << msg << std::endl;
55  std::cerr << "Type 'quit' or CTRL+C to exit." << std::endl;
56  module.close();
57  return 1;
58  }
59  return ret;
60 }
e
e
Definition: compute_ekf_fast.m:13
iCub::learningmachine::registerEventListeners
void registerEventListeners()
Definition: EventListenerCatalogue.h:30
EventListenerCatalogue.h
MachineCatalogue.h
iCub::learningmachine
Definition: DatasetRecorder.h:28
PredictModule.h
iCub::learningmachine::PredictModule::close
virtual bool close()
Close the module.
Definition: PredictModule.h:194
yarp
Copyright (C) 2008 RobotCub Consortium.
Definition: DebugInterfaces.h:51
main
int main(int argc, char *argv[])
Definition: predict.cpp:31
scripting.argc
argc
Definition: scripting.py:184
iCub::learningmachine::registerMachines
void registerMachines()
Definition: MachineCatalogue.h:33
iCub::learningmachine::PredictModule
Definition: PredictModule.h:113