Skip to content

Commit

Permalink
Merge pull request #166 from ibis-ssl/test_autoref_3
Browse files Browse the repository at this point in the history
#163よりちまいバグ修正など
  • Loading branch information
HansRobo authored Feb 23, 2024
2 parents 00ce9ca + d5e1334 commit 5e0db97
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AttackerPlanner : public PlannerBase

auto [best_angle, goal_angle_width] =
world_model->getLargestGoalAngleRangeFromPoint(world_model->ball.pos);
Point best_target = world_model->ball.pos + getNormVec(best_angle) * 0.5;
Point best_target = world_model->ball.pos + getNormVec(best_angle) * 0.3;

// シュートの隙がないときは仲間へパス
if (goal_angle_width < 0.07) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ class FormationPlanner : public PlannerBase
std::vector<Point> getFormationPoints(int robot_num)
{
std::vector<Point> formation_points;
formation_points.emplace_back(0.5, 0.0);
formation_points.emplace_back(0.8, 0.5);
formation_points.emplace_back(0.8, -0.5);
formation_points.emplace_back(1.5, 0.0);
formation_points.emplace_back(1.5, 1.0);
formation_points.emplace_back(1.5, -1.0);
formation_points.emplace_back(0.6, 0.0);
formation_points.emplace_back(0.9, 0.5);
formation_points.emplace_back(0.9, -0.5);
formation_points.emplace_back(1.6, 0.0);
formation_points.emplace_back(1.6, 1.0);
formation_points.emplace_back(1.6, -1.0);

if (world_model->getOurGoalCenter().x() < 0.0) {
for (auto & point : formation_points) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class OurKickOffPlanner : public PlannerBase
// 一番ボールに近いロボットをkickoff attack
auto best_attacker = std::max_element(
selectable_robots.begin(), selectable_robots.end(), [this](const auto & a, const auto & b) {
return world_model->getOurRobot(a)->getDistance(world_model->ball.pos) <
return world_model->getOurRobot(a)->getDistance(world_model->ball.pos) >
world_model->getOurRobot(b)->getDistance(world_model->ball.pos);
});
Point supporter_pos{0.0, 2.0};
Expand All @@ -74,7 +74,7 @@ class OurKickOffPlanner : public PlannerBase
// bの方大きくない => best_attackerであるbが除外される
return false;
} else {
return world_model->getOurRobot(a)->getDistance(supporter_pos) <
return world_model->getOurRobot(a)->getDistance(supporter_pos) >
world_model->getOurRobot(b)->getDistance(supporter_pos);
}
});
Expand Down

0 comments on commit 5e0db97

Please sign in to comment.