iCub-main
icub-main
src
modules
learningMachine
src
bin
train.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
25
#include "
iCub/learningMachine/TrainModule.h
"
26
#include "
iCub/learningMachine/MachineCatalogue.h
"
27
#include "
iCub/learningMachine/EventListenerCatalogue.h
"
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
TrainModule
module;
40
try
{
41
// initialize catalogue of machine factory
42
registerMachines
();
43
44
// initialize catalogue of event listeners
45
registerEventListeners
();
46
47
ret = module.runModule(rf);
48
}
catch
(
const
std::exception&
e
) {
49
std::cerr <<
"Error: "
<<
e
.what() << std::endl;
50
module.
close
();
51
return
1;
52
}
catch
(
char
* msg) {
53
std::cerr <<
"Error: "
<< msg << std::endl;
54
module.
close
();
55
return
1;
56
}
57
return
ret;
58
}
59
EventListenerCatalogue.h
MachineCatalogue.h
TrainModule.h
iCub::learningmachine::PredictModule::close
virtual bool close()
Close the module.
Definition:
PredictModule.h:194
iCub::learningmachine::TrainModule
A module for training.
Definition:
TrainModule.h:90
e
e
Definition:
compute_ekf_fast.m:13
iCub::learningmachine
Definition:
DatasetRecorder.h:28
iCub::learningmachine::registerMachines
void registerMachines()
Definition:
MachineCatalogue.h:33
iCub::learningmachine::registerEventListeners
void registerEventListeners()
Definition:
EventListenerCatalogue.h:30
scripting.argc
argc
Definition:
scripting.py:184
yarp
Copyright (C) 2008 RobotCub Consortium.
Definition:
DebugInterfaces.h:51
main
int main(int argc, char *argv[])
Definition:
train.cpp:31
Generated on Wed Nov 13 2024 21:11:41 for iCub-main by
1.9.1