Decision Module  1.0
ICRA2020 AI Challenge Northwestern Polytechnical University Aoxiang Team Strategy Code
keepDirection_defense_move_strategy.h
Go to the documentation of this file.
1 //
2 // Created by lq on 2020/7/25.
3 //
4 
13 #ifndef ICRA_FIREFLY_ROBORTS_ROBORTS_DECISION_STRATEGY_MOVE_STRATEGYS_KEEPDIRECTION_DEFENSE_MOVE_STRATEGY_H_
14 #define ICRA_FIREFLY_ROBORTS_ROBORTS_DECISION_STRATEGY_MOVE_STRATEGYS_KEEPDIRECTION_DEFENSE_MOVE_STRATEGY_H_
15 
16 #include "../abstract_common_strategy.h"
17 
18 namespace roborts_decision {
19 
21 
22 public:
23  KeepDirectionDefenseMoveStrategy(const std::shared_ptr<MyRobot> &p_my_robot,
24  const std::shared_ptr<Blackboard> &p_blackboard);
25 
26  void run() override;
27 
29 
30  bool CanExecuteMe() override { return true; }
31 
32  BehaviorState Update() override { return behavior_state_; }
33 
34  void Reset() override { behavior_state_ = BehaviorState::IDLE; }
35 };
36 
37 }
38 
39 
40 #endif //ICRA_FIREFLY_ROBORTS_ROBORTS_DECISION_STRATEGY_MOVE_STRATEGYS_KEEPDIRECTION_DEFENSE_MOVE_STRATEGY_H_
roborts_decision::StrategyID::keepDirectionDefendMove
@ keepDirectionDefendMove
roborts_decision::AbstractCommonStrategy
Definition: abstract_common_strategy.h:35
roborts_decision::KeepDirectionDefenseMoveStrategy::getID
StrategyID getID() override
Definition: keepDirection_defense_move_strategy.h:28
roborts_decision::BehaviorState::IDLE
@ IDLE
Idle state, state as default or after cancellation.
roborts_decision::StrategyID
StrategyID
Definition: abstract_common_strategy.h:17
roborts_decision
Definition: behavior_test_node.h:14
roborts_decision::KeepDirectionDefenseMoveStrategy::run
void run() override
Definition: keepDirection_defense_move_strategy.cpp:11
roborts_decision::AbstractCommonStrategy::behavior_state_
BehaviorState behavior_state_
Definition: abstract_common_strategy.h:57
roborts_decision::BehaviorState
BehaviorState
Behavior state.
Definition: behavior_state.h:11
roborts_decision::KeepDirectionDefenseMoveStrategy
Definition: keepDirection_defense_move_strategy.h:20
roborts_decision::KeepDirectionDefenseMoveStrategy::Reset
void Reset() override
Definition: keepDirection_defense_move_strategy.h:34
roborts_decision::KeepDirectionDefenseMoveStrategy::KeepDirectionDefenseMoveStrategy
KeepDirectionDefenseMoveStrategy(const std::shared_ptr< MyRobot > &p_my_robot, const std::shared_ptr< Blackboard > &p_blackboard)
Definition: keepDirection_defense_move_strategy.cpp:7
roborts_decision::KeepDirectionDefenseMoveStrategy::CanExecuteMe
bool CanExecuteMe() override
Definition: keepDirection_defense_move_strategy.h:30
roborts_decision::KeepDirectionDefenseMoveStrategy::Update
BehaviorState Update() override
Definition: keepDirection_defense_move_strategy.h:32