File tree Expand file tree Collapse file tree 5 files changed +24
-11
lines changed
navigator/path_planning_navigator Expand file tree Collapse file tree 5 files changed +24
-11
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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);
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 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 -->
Original file line number Diff line number Diff 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
373373HighLevelStrategy :
You can’t perform that action at this time.
0 commit comments