-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
42 lines (37 loc) · 1000 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "src/includes.ihh"
#include "src/move_head.hpp"
#include "src/action.hpp"
#include "src/configuration.hpp"
#include "src/nao_walk.hpp"
#include "src/nao_broker.hpp"
#define BOOST_SIGNALS_NO_DEPRECATION_WARNING
int main(int argc, char* argv[])
{
if (argc < 5)
{
std::cerr << "Usage 'robotIp' 'reset head(bool)' 'noos_user' 'noos_pass' " << std::endl;
return 1;
}
const std::string robotIp(argv[1]);
configuration parameters;
parameters.set_ip_nao(robotIp);
parameters.set_noos(std::string(argv[3]),
std::string(argv[4]));
decide_action actions;
nao_broker broker_nao;
std::stringstream ss(argv[2]);
bool reset;
ss >> std::boolalpha >> reset;
if (!reset) {
actions.start();
}
else {
move_head head;
float angle_zero = 0.0f;
head.move(angle_zero, 2.0f);
head.stop();
nao_walk walk(false);
walk.stop_posture();
}
return 0;
}