4 * Movement test: used to test the odometry.
6 * Copyright: (c) 2007 CTU Dragons
7 * CTU FEE - Department of Control Engineering
12 #include <movehelper_eb2008.h>
13 #include <robot_eb2008.h>
17 FSM_STATE_DECL(rectangle);
22 /* Where we are at the begining? */
23 robot_set_est_pos_trans(1, 1, DEG2RAD(0));
24 FSM_TRANSITION(rectangle);
28 void follow_rectangle()
30 static bool backward = false;
31 struct TrajectoryConstraints tc = trajectoryConstraintsDefault;
34 /* Allocate new trajectory */
36 robot_trajectory_new(&tc);
38 robot_trajectory_new_backward(&tc);
41 /* Add random point to the trajectory. */
42 robot_trajectory_add_point_trans(2, 0.5);
43 robot_trajectory_add_point_trans(2, 1.5);
44 robot_trajectory_add_point_trans(1, 1.5);
45 robot_trajectory_add_final_point_trans(1, 0.5, TURN(DEG2RAD(90)));
54 // FSM_TRANSITION(turn);
65 robot_trajectory_new(NULL);
66 robot_trajectory_add_final_point_trans(1, 0.5,
83 FSM_TRANSITION(rectangle);
92 /* robot initialization */
95 FSM(MAIN)->debug_states = 1;
96 /*FSM(MOVE)->debug_states = 1;*/
98 robot.fsm[FSM_ID_MAIN].state = &fsm_state_main_init;
100 /* start threads and wait */