- robot.use_left_bumper = true;
- robot.use_right_bumper = true;
- robot.use_back_bumpers = true;
- robot.ignore_hokuyo = false;
-
- act_jaws(CLOSE);
-
- enable_my_square_walls(true);
-
- srand((int)(robot_current_time()*10000));
-
- do {
- goal = (rand() % (SQ_CNTR - 5)) + 5;
-
- } while (goal == 6 || goal == 11);
-
- printf("goal %d time %f\n", goal, robot_current_time());
- if (robot.team_color == RED) {
- goal_x = blue_sq[goal].x;
- goal_y = blue_sq[goal].y;
- } else {
- goal_x = red_sq[goal].x;
- goal_y = red_sq[goal].y;
- }
-
- robot_goto_notrans(goal_x, goal_y, NO_TURN(), &tcFast);
- break;
- case EV_START:
- case EV_TIMER:
- break;
- case EV_RETURN:
- case EV_MOTION_DONE:
- SUBFSM_RET(NULL);
- break;
- case EV_MOTION_ERROR:
- case EV_EXIT:
- break;
- }
-}
-
-/** securely bypass firt figure in front of starting area */
-FSM_STATE(bypass_figure_in_front_of_start)
-{
- switch(FSM_EVENT) {
- case EV_ENTRY:
- robot.use_left_bumper = true;
- robot.use_right_bumper = true;
- robot.use_back_bumpers = true;
- robot.ignore_hokuyo = false;
-
- robot_trajectory_new(&tcFast);