diff --git a/session/crane_planner_plugins/include/crane_planner_plugins/total_defense_planner.hpp b/session/crane_planner_plugins/include/crane_planner_plugins/total_defense_planner.hpp index 0ce3177d..c6316375 100644 --- a/session/crane_planner_plugins/include/crane_planner_plugins/total_defense_planner.hpp +++ b/session/crane_planner_plugins/include/crane_planner_plugins/total_defense_planner.hpp @@ -59,7 +59,7 @@ class TotalDefensePlanner : public PlannerBase auto goalie_id = world_model->getOurGoalieId(); if (ranges::count(selectable_robots, goalie_id) != 0) { selected.push_back(goalie_id); - ranges::remove(remaining_robots, goalie_id); + remaining_robots |= ranges::actions::remove_if([goalie_id](auto elem){return elem == goalie_id;}); auto base = std::make_shared( "goalie", world_model->getOurGoalieId(), world_model); goalie = std::make_shared(base);