Skip to content

Commit b519e76

Browse files
Fix Code Style On improved-free-kick-routine (#2474)
automated style fixes Co-authored-by: FarkasJoseph <FarkasJoseph@users.noreply.github.com>
1 parent 478b1e8 commit b519e76

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/rj_strategy/include/rj_strategy/agent/position/free_kicker.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class FreeKicker : public Position {
3838

3939
private:
4040
std::optional<RobotIntent> derived_get_task(RobotIntent intent) override;
41-
double get_shot_dist_to_goalie(rj_geometry::Point const &goalie_pos, rj_geometry::Point const &shot_target);
41+
double get_shot_dist_to_goalie(rj_geometry::Point const& goalie_pos,
42+
rj_geometry::Point const& shot_target);
4243
};
4344

4445
} // namespace strategy

src/rj_strategy/src/agent/position/free_kicker.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

7776
void 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

Comments
 (0)