ANYbotics / grid_map

Universal grid map library for mobile robotic mapping
BSD 3-Clause "New" or "Revised" License
2.66k stars 804 forks source link

[BUG] For a simple 4x4 map, the rviz plugin only shows a 3x3 grid #338

Open dgitz opened 2 years ago

dgitz commented 2 years ago

Map1.txt

With the map file above, and running the following command: rostopic pub -r 1 /gridmap grid_map_msgs/GridMap -f data/grid_map_msgs/GridMap/Map1.txt

Shows a reduced map in the GridMap rviz plugin: rviz_screenshot_2022_02_10-09_56_01

Not sure if this is just me doing something wrong, if it's a problem only in the plugin, or if it's a problem in the ROS conversion?

1r0b1n0 commented 2 years ago

Hi, I think this is expected behavior : each intersection between the black lines represent a "cell". Nevertheless I agree this is a bit counterintuitive.

If for example we change the first cell to "1.0" instead "0.1", one can easily visualize this : image