Skip to content

Commit

Permalink
Making logic uniform
Browse files Browse the repository at this point in the history
  • Loading branch information
rishiso committed Nov 13, 2023
1 parent 755f1e1 commit cfaab94
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions soccer/src/soccer/planning/planner/plan_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ 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);
double radius = kBallRadius * (1.0 + ball.velocity.mag()) + in.min_dist_from_ball;
if (in.min_dist_from_ball > 0) {
out_static->add(
std::make_shared<rj_geometry::Circle>(in.world_state->ball.position, radius));
Expand Down

0 comments on commit cfaab94

Please sign in to comment.