Skip to content

Commit

Permalink
Style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rishiso committed Nov 6, 2023
1 parent a4a8f14 commit 755f1e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions soccer/src/soccer/planning/planner/plan_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ void fill_obstacles(const PlanRequest& in, rj_geometry::ShapeSet* out_static,
}

// Adding ball as a static obstacle (because dynamic obstacles are not working)
// Only added when STOP state is enabled
double ball_vel_scaled = in.world_state->ball.velocity.mag() * .1;
double radius = kBallRadius + in.min_dist_from_ball * (1.0 + ball_vel_scaled);
if (in.min_dist_from_ball > 0) {
out_static->add(std::make_shared<rj_geometry::Circle>(
in.world_state->ball.position, radius));
out_static->add(
std::make_shared<rj_geometry::Circle>(in.world_state->ball.position, radius));
}

// Finally, add the ball as a dynamic obstacle.
Expand Down

0 comments on commit 755f1e1

Please sign in to comment.