Defines | Functions | Variables

common-states.cc File Reference

#include "robodata.h"
#include <robot.h>
#include <fsm.h>
#include <unistd.h>
#include <math.h>
#include <movehelper.h>
#include <map.h>
#include <sharp.h>
#include <robomath.h>
#include <string.h>
#include <robodim.h>
#include <error.h>
#include "actuators.h"
#include <trgen.h>
#include "match-timing.h"
#include <stdbool.h>
#include <ul_log.h>
#include "common-states.h"
Include dependency graph for common-states.cc:

Defines

#define FSM_MAIN
#define DBG_FSM_STATE(name)

Functions

 UL_LOG_CUST (ulogd_common_states)
void set_initial_position ()
void actuators_home ()
void start_entry ()
void start_timer ()
void start_go ()
void start_exit ()
bool read_sharp ()
void enable_bumpers (bool enabled)
void enable_my_square_walls (bool enabled)
 FSM_STATE (move_around)
 generate "random" positions on oponent squares and goto this position
 FSM_STATE (approach_opp_bonus_figure)
 pick figure from opponent bonus square
 FSM_STATE (load_opp_bonus_figure)
 FSM_STATE (place_opp_bonus_figure)
 FSM_STATE (leave_opp_bonus_figure)
 FSM_STATE (bypass_figure_in_front_of_start)
 securely bypass firt figure in front of starting area
 FSM_STATE (approach_second_green_figure)
 pick second figure from green area
 FSM_STATE (load_second_green_figure)
 FSM_STATE (go_out_second_green_figure)
 FSM_STATE (place_figure_to_protected_block)
 FSM_STATE (leave_protected_figure)
 FSM_STATE (approach_third_green_figure)
 pick third figure from green area
 FSM_STATE (load_third_green_figure)
 FSM_STATE (go_out_third_green_figure)
 FSM_STATE (place_figure_to_near_area)
 FSM_STATE (leave_near_figure)
 FSM_STATE (place_figure_to_bonus_area)
 FSM_STATE (leave_bonus_figure)
 FSM_STATE (approach_fourth_green_figure)
 pick fourth green figure from green area
 FSM_STATE (load_fourth_green_figure)
 FSM_STATE (go_out_fourth_green_figure)
 FSM_STATE (place_figure_to_red_square)
 FSM_STATE (leave_red_square_figure)
 FSM_STATE (approach_fifth_green_figure)
 pick fifth green figure from green area
 FSM_STATE (load_fifth_green_figure)
 FSM_STATE (go_out_fifth_green_figure)
 FSM_STATE (approach_center_figure)
 pick center figure
 FSM_STATE (load_center_figure)

Variables

struct TrajectoryConstraints
tcFast tcVeryFast tcSlow 
tcVerySlow
bool tower = false
bool bonus_placed = false
const double load_dist = 0.04
const double app_dist = 0.04
const int move_around [][8]

Define Documentation

#define DBG_FSM_STATE (   name  ) 
Value:
do { if (fsm->debug_states) ul_loginf("fsm %s %.1f: %s(%s)\n", \
                                                                   fsm->debug_name, robot_current_time(), \
                                                                   name, fsm_event_str(fsm->events[fsm->ev_head])); } while(0)
#define FSM_MAIN

Function Documentation

void actuators_home (  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

void enable_bumpers ( bool  enabled  )  [inline]
void enable_my_square_walls ( bool  enabled  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

FSM_STATE ( approach_center_figure   ) 

pick center figure

Here is the call graph for this function:

FSM_STATE ( load_fifth_green_figure   ) 

Here is the call graph for this function:

FSM_STATE ( bypass_figure_in_front_of_start   ) 

securely bypass firt figure in front of starting area

Here is the call graph for this function:

FSM_STATE ( approach_second_green_figure   ) 

pick second figure from green area

Here is the call graph for this function:

FSM_STATE ( place_figure_to_red_square   ) 

Here is the call graph for this function:

FSM_STATE ( go_out_fourth_green_figure   ) 

Here is the call graph for this function:

FSM_STATE ( load_fourth_green_figure   ) 

Here is the call graph for this function:

FSM_STATE ( approach_fourth_green_figure   ) 

pick fourth green figure from green area

Here is the call graph for this function:

FSM_STATE ( leave_red_square_figure   ) 

Here is the call graph for this function:

FSM_STATE ( place_figure_to_bonus_area   ) 

Here is the call graph for this function:

FSM_STATE ( approach_fifth_green_figure   ) 

pick fifth green figure from green area

Here is the call graph for this function:

FSM_STATE ( place_figure_to_near_area   ) 

Here is the call graph for this function:

FSM_STATE ( load_second_green_figure   ) 

Here is the call graph for this function:

FSM_STATE ( load_third_green_figure   ) 

Here is the call graph for this function:

FSM_STATE ( approach_third_green_figure   ) 

pick third figure from green area

Here is the call graph for this function:

FSM_STATE ( leave_protected_figure   ) 

Here is the call graph for this function:

FSM_STATE ( go_out_fifth_green_figure   ) 

Here is the call graph for this function:

FSM_STATE ( go_out_second_green_figure   ) 

Here is the call graph for this function:

FSM_STATE ( load_center_figure   ) 

Here is the call graph for this function:

FSM_STATE ( place_figure_to_protected_block   ) 

Here is the call graph for this function:

FSM_STATE ( move_around   ) 

generate "random" positions on oponent squares and goto this position

Here is the call graph for this function:

FSM_STATE ( leave_opp_bonus_figure   ) 

Here is the call graph for this function:

FSM_STATE ( leave_bonus_figure   ) 

Here is the call graph for this function:

FSM_STATE ( leave_near_figure   ) 

Here is the call graph for this function:

FSM_STATE ( go_out_third_green_figure   ) 

Here is the call graph for this function:

FSM_STATE ( approach_opp_bonus_figure   ) 

pick figure from opponent bonus square

Here is the call graph for this function:

FSM_STATE ( load_opp_bonus_figure   ) 

Here is the call graph for this function:

FSM_STATE ( place_opp_bonus_figure   ) 

Here is the call graph for this function:

bool read_sharp (  ) 

Here is the caller graph for this function:

void set_initial_position (  ) 

Here is the caller graph for this function:

void start_entry (  ) 

Here is the caller graph for this function:

void start_exit (  ) 

Here is the caller graph for this function:

void start_go (  ) 

Here is the caller graph for this function:

void start_timer (  ) 

Here is the caller graph for this function:

UL_LOG_CUST ( ulogd_common_states   ) 

Variable Documentation

const double app_dist = 0.04
bool bonus_placed = false
const double load_dist = 0.04
const int move_around[][8]
Initial value:
 {{12, 14, 11, 13, 11, 8, 6, 9},
                            {6, 8, 11, 13, 11, 14, 12, 9},
                            {11, 13, 11, 8, 11, 14, 12, 9},
                            {6, 8, 11, 13, 11, 14, 12, 9},
                            {11, 8, 11, 13, 11, 14, 12, 9}}
struct TrajectoryConstraints tcFast tcVeryFast tcSlow tcVerySlow
bool tower = false