]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/robofsm/main.cc
Merge branch 'master' of jaresf1@rtime:/var/git/eurobot
[eurobot/public.git] / src / robofsm / main.cc
1 #include <robot.h>
2 #include <fsm.h>
3 #include <string.h>
4 #include "robodata.h"
5 #include <error.h>
6
7 int main()
8 {
9         int rv;
10
11         rv = robot_init();
12         if (rv) error(1, errno, "robot_init() returned %d\n", rv);
13
14         robot.obstacle_avoidance_enabled = true;
15
16         robot.fsm.main.debug_states = 1;
17         robot.fsm.motion.debug_states = 1;
18         robot.fsm.act.debug_states = 1;
19
20         robot.fsm.main.state = &fsm_state_main_init;
21
22         rv = robot_start();
23         if (rv) error(1, errno, "robot_start() returned %d\n", rv);
24
25         robot_destroy();
26
27         return 0;
28 }