Skip to content

Commit bcd1324

Browse files
HovorunBhmasf7g
authored andcommitted
Fix world to map coordinate conversion (ros-navigation#4506)
Signed-off-by: HovorunBh <[email protected]>
1 parent 554b012 commit bcd1324

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nav2_smac_planner/test/test_utils.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,9 @@ TEST(convert_map_to_world_to_map, test_convert_map_to_world_to_map)
155155
float mx = 200.0;
156156
float my = 100.0;
157157
geometry_msgs::msg::Pose pose = getWorldCoords(mx, my, &costmap);
158+
159+
float mx1, my1;
160+
costmap.worldToMapContinuous(pose.position.x, pose.position.y, mx1, my1);
161+
EXPECT_NEAR(mx, mx1, 1e-3);
162+
EXPECT_NEAR(my, my1, 1e-3);
158163
}

0 commit comments

Comments
 (0)