From 30f4eb973e1573c5d6e81e7a814f828922ca172f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 20:52:39 -0500 Subject: [PATCH] Fix Code Style On james-vogt/variable-kick (#2156) automated style fixes Co-authored-by: Squid5678 --- soccer/src/soccer/strategy/agent/position/offense.cpp | 11 +++++------ soccer/src/soccer/strategy/agent/position/offense.hpp | 5 ++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/soccer/src/soccer/strategy/agent/position/offense.cpp b/soccer/src/soccer/strategy/agent/position/offense.cpp index 524ad177756..a819d466f76 100644 --- a/soccer/src/soccer/strategy/agent/position/offense.cpp +++ b/soccer/src/soccer/strategy/agent/position/offense.cpp @@ -83,7 +83,7 @@ Offense::State Offense::update_state() { } std::optional Offense::state_to_task(RobotIntent intent) { - float dist {0.0f}; + float dist{0.0f}; if (current_state_ == IDLING) { // Do nothing auto empty_motion_cmd = planning::MotionCommand{}; @@ -106,12 +106,11 @@ std::optional Offense::state_to_task(RobotIntent intent) { intent.shoot_mode = RobotIntent::ShootMode::KICK; // NOTE: Check we can actually use break beams intent.trigger_mode = RobotIntent::TriggerMode::ON_BREAK_BEAM; - //Adjusts kick speed based on distance. Refer to - //TIGERS Mannheim eTDP from 2019 for details - //See also passer.py in rj_gameplay + // Adjusts kick speed based on distance. Refer to + // TIGERS Mannheim eTDP from 2019 for details + // See also passer.py in rj_gameplay dist = target_robot_pos.dist_to(this_robot_pos); - intent.kick_speed = std::sqrt((std::pow(FINAL_BALL_SPEED, 2)) - - (2 * BALL_DECEL * dist)); + intent.kick_speed = std::sqrt((std::pow(FINAL_BALL_SPEED, 2)) - (2 * BALL_DECEL * dist)); intent.is_active = true; return intent; } else if (current_state_ == PREPARING_SHOT) { diff --git a/soccer/src/soccer/strategy/agent/position/offense.hpp b/soccer/src/soccer/strategy/agent/position/offense.hpp index 053f230149f..4d778c9beba 100644 --- a/soccer/src/soccer/strategy/agent/position/offense.hpp +++ b/soccer/src/soccer/strategy/agent/position/offense.hpp @@ -36,9 +36,8 @@ class Offense : public Position { private: bool kicking_{true}; - static constexpr float FINAL_BALL_SPEED {0.0f}; - static constexpr float BALL_DECEL {-0.4f}; - + static constexpr float FINAL_BALL_SPEED{0.0f}; + static constexpr float BALL_DECEL{-0.4f}; std::optional derived_get_task(RobotIntent intent) override; // TODO (Kevin): strategy design pattern for BallHandler/Receiver