@@ -36,10 +36,9 @@ std::optional<RobotIntent> FreeKicker::derived_get_task(RobotIntent intent) {
3636 double const right_dist = get_shot_dist_to_goalie (enemy_goalie_location, right_goal_post);
3737 rj_geometry::Point const best_shot = left_dist < right_dist ? right_goal_post : left_goal_post;
3838
39-
4039 /*
4140 LOGIC FOR PASSING WHEN SHOT TOO EXTREME (i.e. CORNER KICK)
42-
41+
4342 double const shot_angle = abs((best_shot - this->last_world_state_->ball.position).angle());
4443
4544 if (shot_angle > 3 * M_PI / 4.0 ||
@@ -50,8 +49,8 @@ std::optional<RobotIntent> FreeKicker::derived_get_task(RobotIntent intent) {
5049 return intent;
5150 }
5251
53- SPDLOG_INFO("Free Kicker {} shooting at point {}, {} with angle {}", this->robot_id_, best_shot.x(),
54- best_shot.y(), shot_angle);
52+ SPDLOG_INFO("Free Kicker {} shooting at point {}, {} with angle {}", this->robot_id_,
53+ best_shot.x(), best_shot.y(), shot_angle);
5554 */
5655
5756 planning::LinearMotionInstant target{best_shot};
@@ -76,10 +75,10 @@ void FreeKicker::derived_pass_ball() {}
7675
7776void FreeKicker::derived_acknowledge_ball_in_transit () {}
7877
79- double FreeKicker::get_shot_dist_to_goalie (rj_geometry::Point const & goalie_pos,
80- rj_geometry::Point const & shot_target) {
78+ double FreeKicker::get_shot_dist_to_goalie (rj_geometry::Point const & goalie_pos,
79+ rj_geometry::Point const & shot_target) {
8180 rj_geometry::Point const ball_position = this ->last_world_state_ ->ball .position ;
82- return std::abs ((goalie_pos - ball_position).cross (shot_target - ball_position)) /
83- (shot_target - ball_position).mag ();
84- }
85- } // namespace strategy
81+ return std::abs ((goalie_pos - ball_position).cross (shot_target - ball_position)) /
82+ (shot_target - ball_position).mag ();
83+ }
84+ } // namespace strategy
0 commit comments