Skip to content

Commit aa6d1f9

Browse files
committed
Merge branch 'robocup_2019' of github.com:UBC-Thunderbots/Software into robocup_2019
2 parents dfe038d + b76e93e commit aa6d1f9

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

src/thunderbots/software/ai/hl/stp/play/corner_kick_play.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ void CornerKickPlay::getNextTactics(TacticCoroutine::push_type &yield)
130130
PassGenerator pass_generator(world, world.ball().position(),
131131
PassType::ONE_TOUCH_SHOT);
132132

133+
// Target any pass in the enemy half of the field, shifted up by 1 meter
134+
// from the center line
135+
pass_generator.setTargetRegion(Rectangle(
136+
Point(1, world.field().width()/2),
137+
world.field().enemyCornerNeg()
138+
));
139+
133140
std::pair<Pass, double> best_pass_and_score_so_far =
134141
pass_generator.getBestPassSoFar();
135142

src/thunderbots/software/ai/hl/stp/tactic/goalie_tactic.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,11 @@ void GoalieTactic::calculateNextIntent(IntentCoroutine::push_type &yield)
146146

147147
// compute intersection points from ball position and velocity
148148
Ray ball_ray = Ray(ball.position(), ball.velocity());
149+
150+
const Point neg_goal_line_inflated = field.friendlyGoalpostNeg() + Point(0,-0.05);
151+
const Point pos_goal_line_inflated = field.friendlyGoalpostPos() + Point(0,0.05);
149152
Segment full_goal_segment =
150-
Segment(field.friendlyGoalpostNeg(), field.friendlyGoalpostPos());
153+
Segment(neg_goal_line_inflated, pos_goal_line_inflated);
151154

152155
auto [intersection1, intersection2] =
153156
raySegmentIntersection(ball_ray, full_goal_segment);

src/thunderbots/software/ai/navigator/path_planning_navigator/path_planning_navigator.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,17 @@ std::vector<std::unique_ptr<Primitive>> PathPlanningNavigator::getAssignedPrimit
175175
intent->accept(*this);
176176
if (this->current_robot)
177177
{
178-
this->velocity_obstacles.emplace_back(
179-
Obstacle::createVelocityObstacleWithScalingParams(
180-
this->current_robot->position(), this->current_destination,
181-
this->current_robot->velocity().len(),
182-
Util::DynamicParameters::Navigator::robot_obstacle_inflation_factor
183-
.value(),
184-
Util::DynamicParameters::Navigator::velocity_obstacle_inflation_factor
185-
.value()));
178+
if(this->current_robot->velocity().len()>0.3)
179+
{
180+
this->velocity_obstacles.emplace_back(
181+
Obstacle::createVelocityObstacleWithScalingParams(
182+
this->current_robot->position(), this->current_destination,
183+
this->current_robot->velocity().len(),
184+
Util::DynamicParameters::Navigator::robot_obstacle_inflation_factor
185+
.value(),
186+
Util::DynamicParameters::Navigator::velocity_obstacle_inflation_factor
187+
.value()));
188+
}
186189

187190
this->current_robot = std::nullopt;
188191
}

src/thunderbots/software/launch/ai.launch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</node>
1515

1616
<!-- Launch the ai logic node -->
17-
<node name="ai_logic" pkg="thunderbots" type="ai_logic" output="screen" respawn="false">
17+
<node name="ai_logic" pkg="thunderbots" type="ai_logic" output="screen" respawn="true">
1818
</node>
1919

2020
<!-- Launch the dynamic parameters node -->

src/thunderbots/software/util/parameter/config/ai.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ ShootOrPassPlay:
367367
min_open_angle_for_shot_deg:
368368
min: 0.0
369369
max: 90.0
370-
default: 4
370+
default: 6
371371
type: double
372372
description: The minimum open angle to the goal that we require before taking a shot
373373
HighLevelStrategy:

0 commit comments

Comments
 (0)