diff --git a/soccer/src/soccer/planning/planner/plan_request.cpp b/soccer/src/soccer/planning/planner/plan_request.cpp index 9146f70ca7a..b21b7ccd5e7 100644 --- a/soccer/src/soccer/planning/planner/plan_request.cpp +++ b/soccer/src/soccer/planning/planner/plan_request.cpp @@ -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( - in.world_state->ball.position, radius)); + out_static->add( + std::make_shared(in.world_state->ball.position, radius)); } // Finally, add the ball as a dynamic obstacle.