Skip to content

Commit

Permalink
removed unnessesary change
Browse files Browse the repository at this point in the history
  • Loading branch information
sanatd33 committed Jan 29, 2025
1 parent 6fb75a1 commit 515d1bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
5 changes: 0 additions & 5 deletions soccer/src/soccer/planning/primitives/angle_planning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ void plan_angles(Trajectory* trajectory, const RobotInstant& start_instant,
target_angles.at(i) = angle_function(instant, target_angles.at(i - 1), &gradient);
velocity.at(i) =
trajectory->instant_at(i).linear_velocity().dot(rj_geometry::Point(gradient));
if (std::isnan(velocity.at(i))) {
SPDLOG_INFO("Linear Velocity: {}", trajectory->instant_at(i).linear_velocity().mag());
SPDLOG_INFO("Gradient: {}", rj_geometry::Point(gradient).mag());
SPDLOG_INFO("SDFSDFSDFSDFSDFSDF");
}
}

// TODO(#1506): Re-enable this. Currently the forward-tracking is disabled
Expand Down
13 changes: 6 additions & 7 deletions soccer/src/soccer/strategy/agent/position/offense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Offense::State Offense::next_state() {
case POSSESSION_START: {
// If we can make a shot, take it
// If we need to stop possessing now, shoot.
// if (has_open_shot() || timed_out()) {
// return SHOOTING_START;
// }
if (has_open_shot() || timed_out()) {
return SHOOTING_START;
}

// No open shot, try to pass.
// This will trigger an automatic switch to passing if a pass is
Expand All @@ -75,10 +75,9 @@ Offense::State Offense::next_state() {
case POSSESSION: {
// If we can make a shot, make it.
// If we need to stop possessing now, shoot.

// if (has_open_shot() || timed_out()) {
// return SHOOTING_START;
// }
if (has_open_shot() || timed_out()) {
return SHOOTING_START;
}

return POSSESSION;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,18 @@ void RobotFactoryPosition::set_default_position() {
field_dimensions_.center_field_loc().y() - kBallDiameter) {
// Offensive mode
// Closest 2 robots on defense, rest on offense
if (i <= 2) {
if (i <= 3) {
set_current_position<Defense>();
} else {
set_current_position<Offense>();
set_current_position<SoloOffense>();
}
} else {
// Defensive mode
// Closest 4 robots on defense, rest on offense
if (i <= 3) {
set_current_position<Defense>();
} else {
set_current_position<Offense>();
set_current_position<SoloOffense>();
}
}
}
Expand Down

0 comments on commit 515d1bb

Please sign in to comment.