From 2cbf9984d3e79a5b3f20d55f8c79342092111317 Mon Sep 17 00:00:00 2001 From: kfu02 Date: Wed, 10 Jan 2024 02:03:41 +0000 Subject: [PATCH] automated style fixes --- .../src/soccer/strategy/agent/position/offense.cpp | 13 ++++++------- .../src/soccer/strategy/agent/position/offense.hpp | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/soccer/src/soccer/strategy/agent/position/offense.cpp b/soccer/src/soccer/strategy/agent/position/offense.cpp index c625ce611fc..76c404421f2 100644 --- a/soccer/src/soccer/strategy/agent/position/offense.cpp +++ b/soccer/src/soccer/strategy/agent/position/offense.cpp @@ -94,11 +94,11 @@ std::optional Offense::state_to_task(RobotIntent intent) { intent.motion_command = empty_motion_cmd; return intent; } else if (current_state_ == PASSING) { - //TODO: Remove this + // TODO: Remove this /* Commented for now, may need for testing later. */ - //this->target_robot_id = 2; + // this->target_robot_id = 2; // attempt to pass the ball to the target robot rj_geometry::Point target_robot_pos = last_world_state_->get_robot(true, target_robot_id).pose.position(); @@ -110,12 +110,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 b31979daf11..aec18f882ea 100644 --- a/soccer/src/soccer/strategy/agent/position/offense.hpp +++ b/soccer/src/soccer/strategy/agent/position/offense.hpp @@ -36,9 +36,9 @@ class Offense : public Position { private: bool kicking_{true}; - const float FINAL_BALL_SPEED {0.0f}; - const float BALL_DECEL {-0.4f}; - float dist {0.0f}; + const float FINAL_BALL_SPEED{0.0f}; + const float BALL_DECEL{-0.4f}; + float dist{0.0f}; std::optional derived_get_task(RobotIntent intent) override; // TODO (Kevin): strategy design pattern for BallHandler/Receiver