20 explicit ReceiverFSM(TbotsProto::ReceiverTacticConfig receiver_tactic_config)
21 : receiver_tactic_config(receiver_tactic_config)
25 class OneTouchShotState;
26 class ReceiveAndDribbleState;
27 class WaitingForPassState;
32 std::optional<Pass> pass = std::nullopt;
35 bool disable_one_touch_shot =
false;
38 DEFINE_TACTIC_UPDATE_STRUCT_WITH_CONTROL_AND_COMMON_PARAMS
40 static constexpr double MIN_PASS_START_SPEED_M_PER_SEC = 0.02;
41 static constexpr double BALL_MIN_MOVEMENT_SPEED_M_PER_SEC = 0.04;
48 static constexpr double MIN_STRAY_PASS_SPEED = 0.3;
69 const Point& best_shot_target);
79 std::optional<Shot> findFeasibleShot(
const World& world,
const Robot& assigned_robot);
146 using namespace boost::sml;
148 DEFINE_SML_STATE(ReceiveAndDribbleState)
149 DEFINE_SML_STATE(OneTouchShotState)
150 DEFINE_SML_STATE(WaitingForPassState)
151 DEFINE_SML_EVENT(Update)
162 return make_transition_table(
164 *WaitingForPassState_S + Update_E[!passStarted_G] / updateReceive_A,
165 WaitingForPassState_S + Update_E[passStarted_G && onetouchPossible_G] /
166 updateOnetouch_A = OneTouchShotState_S,
167 WaitingForPassState_S + Update_E[passStarted_G && !onetouchPossible_G] /
168 updateReceive_A = ReceiveAndDribbleState_S,
169 ReceiveAndDribbleState_S + Update_E[!passFinished_G] / adjustReceive_A,
170 OneTouchShotState_S +
171 Update_E[!passFinished_G && !strayPass_G] / updateOnetouch_A,
172 OneTouchShotState_S + Update_E[!passFinished_G && strayPass_G] /
173 adjustReceive_A = ReceiveAndDribbleState_S,
174 ReceiveAndDribbleState_S + Update_E[passFinished_G] / adjustReceive_A = X,
175 OneTouchShotState_S + Update_E[passFinished_G] / updateOnetouch_A = X,
176 X + Update_E / SET_STOP_PRIMITIVE_ACTION = X);
181 TbotsProto::ReceiverTacticConfig receiver_tactic_config;