User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs:ai:start [2018/02/24 13:59]
Mike Bykhovtsev Tweak
cs:ai:start [2022/09/22 18:57] (current)
Justin Pilgrim [AI]
Line 1: Line 1:
 ====== AI ====== ====== AI ======
 Main function of AI on the sub is to make decisions of what the sub should do based on given data from topics like sensors, vision, data, etc. It is using hierarchical state machine, which allows it to cover majority of cases it will face.  Main function of AI on the sub is to make decisions of what the sub should do based on given data from topics like sensors, vision, data, etc. It is using hierarchical state machine, which allows it to cover majority of cases it will face. 
 +
 ===== Overview ===== ===== Overview =====
  
Line 42: Line 43:
   * Every time you restart roscore you need to reload parameters   * Every time you restart roscore you need to reload parameters
   * Our vision detection requires undistortion to be running. ​   * Our vision detection requires undistortion to be running. ​
 +
 +
 +===== Example Flow Chart =====
 +<​flow>​
 +graph LR;
 +    A(SM_ROOT)-->​|execute|B[START_SWITCH];​
 +    subgraph RoboSub
 +    B-->​C[GATE_TASK];​
 +    C-->​D[PATH_MARKER_TASK1];​
 +    D-->​E[DICE_TASK];​
 +    E-->​F[PATH_MARKER_TASK2];​
 +    F-->​G[GOTO_PINGER];​
 +    G-->​H{Where am I?};
 +    H-->​|Roulette|I[ROULETTE_TASK];​
 +    H-->​|Square|J[SQUARE_TASK];​
 +    end
 +    I-->​EN((end))
 +    J-->​EN((end))
 +click B "​start_switch"​
 +click C "​gate_task"​
 +click D "​path_marker_task"​
 +click E "​dice_task"​
 +click F "​path_marker_task"​
 +click G "​goto_pinger"​
 +click I "​roulette_task"​
 +click J "​square_task"​
 +style A fill:#​f9f,​stroke:#​333,​stroke-width:​2px;​
 +style EN fill:#​f9f,​stroke:#​333,​stroke-width:​2px;​
 +</​flow>​