2 * competition.cc 12/02/28
4 * Robot's control program intended for homologation (approval phase) on Eurobot 2012.
6 * Copyright: (c) 2012 CTU Flamingos
7 * CTU FEE - Department of Control Engineering
16 #include <movehelper.h>
23 #include "actuators.h"
25 #include "match-timing.h"
27 #include "common-states.h"
29 UL_LOG_CUST(ulogd_homologation); /* Log domain name = ulogd + name of the file */
31 /************************************************************************
32 * Trajectory constraints used, are initialized in the init state
33 ************************************************************************/
35 /************************************************************************
37 ************************************************************************/
44 if (rv) error(1, errno, "robot_init() returned %d\n", rv);
46 robot.obstacle_avoidance_enabled = true;
48 robot.fsm.main.debug_states = 1;
49 robot.fsm.motion.debug_states = 1;
50 //robot.fsm.act.debug_states = 1;
52 robot.fsm.main.state = &fsm_state_main_get_central_buillon_first;
53 //robot.fsm.main.transition_callback = trans_callback;
54 //robot.fsm.motion.transition_callback = move_trans_callback;
56 tcVeryFast = trajectoryConstraintsDefault;
58 tcVeryFast.maxacc = 0.6;
59 tcVeryFast.maxomega = 2;
60 tcFast = trajectoryConstraintsDefault;
65 tcSlow = trajectoryConstraintsDefault;
70 tcVerySlow = trajectoryConstraintsDefault;
71 tcVerySlow.maxv = 0.1;
72 tcVerySlow.maxacc = 0.1;
73 tcVerySlow.maxomega = 0.2;
74 tcVerySlow.maxe = 0.02;
76 if (rv) error(1, errno, "robot_start() returned %d\n", rv);