-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from RoboTeamTwente/BallPlacementUs
Fully include next ref command
- Loading branch information
Showing
37 changed files
with
331 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...nclude/roboteam_ai/stp/evaluations/game_states/BallPlacementUsDirectGameStateEvaluation.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Created by timovdk on 4/14/20. | ||
// | ||
|
||
#ifndef RTT_BALLPLACEMENTUSDIRECTGAMESTATEEVALUATION_H | ||
#define RTT_BALLPLACEMENTUSDIRECTGAMESTATEEVALUATION_H | ||
|
||
#include "stp/evaluations/BaseEvaluation.h" | ||
|
||
namespace rtt::ai::stp::evaluation { | ||
/** | ||
* @brief Class that evaluates the ball placement us game state when the next command is direct free kick | ||
*/ | ||
class BallPlacementUsDirectGameStateEvaluation : public BaseEvaluation { | ||
public: | ||
/** | ||
* @brief Calculates the score for the ball placement us game state when the next command is direct free kick | ||
* @param world The current world | ||
* @param field The current field | ||
* @return The score of the ball placement direct us game state | ||
*/ | ||
[[nodiscard]] uint8_t metricCheck(const world::World* world, const Field* field) const noexcept override; | ||
|
||
/** | ||
* @brief Retrieves the name of the evaluation | ||
* @return A string containing the name of the evaluation | ||
*/ | ||
const char* getName() override { return "gs::BallPlacementUsDirect"; } | ||
}; | ||
} // namespace rtt::ai::stp::evaluation | ||
|
||
#endif // RTT_BALLPLACEMENTUSDIRECTGAMESTATEEVALUATION_H |
45 changes: 45 additions & 0 deletions
45
roboteam_ai/include/roboteam_ai/stp/plays/referee_specific/BallPlacementUsForceStart.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#ifndef RTT_BallPlacementUsForceStart_H | ||
#define RTT_BallPlacementUsForceStart_H | ||
|
||
#include "stp/Play.hpp" | ||
|
||
namespace rtt::ai::stp::play { | ||
|
||
/** | ||
* @brief The ball placement us Force Start play is executed when the ball placement us game state is selected and the next ref command is not Free kick us, meaning it will be a | ||
* force start | ||
*/ | ||
class BallPlacementUsForceStart : public Play { | ||
public: | ||
/** | ||
* @brief Constructor that initializes roles with roles that are necessary for this play | ||
*/ | ||
BallPlacementUsForceStart(); | ||
|
||
/** | ||
* @brief Calculates the score of this play to determine which play is best in this situation | ||
* @param field The current Field | ||
* @return The score of this play (0-255) | ||
*/ | ||
uint8_t score(const rtt::Field& field) noexcept override; | ||
|
||
/** | ||
* @brief Assigns robots to roles of this play | ||
* @return A map with assigned roles | ||
*/ | ||
Dealer::FlagMap decideRoleFlags() const noexcept override; | ||
|
||
/** | ||
* @brief Calculates info for the roles | ||
*/ | ||
void calculateInfoForRoles() noexcept override; | ||
|
||
/** | ||
* @brief Retrieves the name of the play | ||
* @return The name of the play as a string | ||
*/ | ||
const char* getName() const override; | ||
}; | ||
} // namespace rtt::ai::stp::play | ||
|
||
#endif // RTT_BallPlacementUsForceStart_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.