From ca2693ee6329fe90c2551860ce248e2e33618da7 Mon Sep 17 00:00:00 2001 From: Jarek Karwowski Date: Wed, 20 Sep 2023 18:24:18 +0200 Subject: [PATCH] `planner` - implemented early return in `selectRelevant` (when all objects are neglected) --- include/hubero_local_planner/hubero_planner.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/hubero_local_planner/hubero_planner.h b/include/hubero_local_planner/hubero_planner.h index b3fc1656..43cab04a 100644 --- a/include/hubero_local_planner/hubero_planner.h +++ b/include/hubero_local_planner/hubero_planner.h @@ -360,6 +360,11 @@ class HuberoPlanner { return std::move(objects); } + // some type of objects is completely neglected + if (max_object_num == 0) { + return std::vector(); + } + // pair with scalar metric and object std::vector> objects_sort; // save metrics for each object