ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.34k stars 1.21k forks source link

Obstacle Position Shift in Map after Loading #4360

Closed woshilianglianglianga closed 1 month ago

woshilianglianglianga commented 1 month ago

Description The PGM file provided to the map node and the image published on the /map topic by the map node have some discrepancies. Specifically, the origin and size are correct, but all obstacles are slightly shifted towards the bottom right.

Environment ROS 2 Version: Humble ubuntu22.04 source install Navigation Package: nav2 Map Format: PGM map.yaml file content resolution: 0.05 origin: [-4.0,-3.0,0] negate: 0 occupied_thresh: 0.65 free_thresh: 0.196 map.zip

Steps to reproduce Provide a map file in PGM format. Use the above map.yaml configuration file. Start the map server node. Observe the image published on the /map topic. Expected behavior The loaded map should match the original PGM file, with all obstacles in the correct positions.

Actual behavior Obstacles are shifted towards the bottom right in the loaded map.

Additional information The origin and map size are correct; the issue only occurs with the position of the obstacles.

SteveMacenski commented 1 month ago

What does this mean?

Obstacles are shifted towards the bottom right in the loaded map.

Please show us screen shots

woshilianglianglianga commented 1 month ago

sry my bad