From 6d86ad65a2d99e6901fe4dfd730680803e7e7480 Mon Sep 17 00:00:00 2001 From: duongtd Date: Thu, 23 Oct 2025 17:23:41 +0700 Subject: [PATCH] 1723_23102025 --- src/costmap_2d.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/costmap_2d.cpp b/src/costmap_2d.cpp index 6afbc0b..ac646a3 100644 --- a/src/costmap_2d.cpp +++ b/src/costmap_2d.cpp @@ -62,5 +62,10 @@ namespace costmap_2d return false; } + void Costmap2D::worldToMapNoBounds(double wx, double wy, int& mx, int& my) const + { + mx = (int)((wx - origin_x_) / resolution_); + my = (int)((wy - origin_y_) / resolution_); + } } \ No newline at end of file