From 3bf69bf5bc81445c0f64c2a1df52618ef69cd935 Mon Sep 17 00:00:00 2001 From: Vladyslav Hrynchak Date: Thu, 25 Jul 2024 14:11:12 +0300 Subject: [PATCH] Update costmap_2d_publisher.cpp Signed-off-by: Vladyslav Hrynchak --- nav2_costmap_2d/src/costmap_2d_publisher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nav2_costmap_2d/src/costmap_2d_publisher.cpp b/nav2_costmap_2d/src/costmap_2d_publisher.cpp index c877a5dfd6..011995aa88 100644 --- a/nav2_costmap_2d/src/costmap_2d_publisher.cpp +++ b/nav2_costmap_2d/src/costmap_2d_publisher.cpp @@ -146,8 +146,8 @@ void Costmap2DPublisher::prepareGrid() double wx, wy; costmap_->mapToWorld(0, 0, wx, wy); - grid_->info.origin.position.x = wx - grid_resolution / 2; - grid_->info.origin.position.y = wy - grid_resolution / 2; + grid_->info.origin.position.x = wx - grid_resolution_ / 2; + grid_->info.origin.position.y = wy - grid_resolution_ / 2; grid_->info.origin.position.z = map_vis_z_; grid_->info.origin.orientation.w = 1.0;