From 6ee28d02e33ffb76f85ae888cf66018fbc33bc95 Mon Sep 17 00:00:00 2001 From: Tony Najjar Date: Mon, 9 Dec 2024 09:48:51 +0100 Subject: [PATCH] fail if out of bounds Signed-off-by: Tony Najjar --- nav2_costmap_2d/src/costmap_2d_ros.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/nav2_costmap_2d/src/costmap_2d_ros.cpp b/nav2_costmap_2d/src/costmap_2d_ros.cpp index f834c8791a..a35a1786bb 100644 --- a/nav2_costmap_2d/src/costmap_2d_ros.cpp +++ b/nav2_costmap_2d/src/costmap_2d_ros.cpp @@ -861,6 +861,7 @@ void Costmap2DROS::getCostsCallback( pose_transformed.pose.position.y, mx, my); if (!in_bounds) { + response->success = false; response->costs.push_back(LETHAL_OBSTACLE); continue; }