Extra space around map created in gmapping causing extra pixels in pgm file.

asked 2022-05-27 08:07:50 -0600

spenceinvents gravatar image

Hi There, I am trying to use gmapping to create a map of a custom gazebo world. The problem is that when the gmapping is launched, an "extra area" (shown in red, below) appears around the map as it is created. Then, when saving the map, this extra area is present in the .pgm file, which is undesirable as it messes up our path planner.

Here is the extra area that appears (shown in red): The "Extra area" shown in red

After completing mapping, the pgm file looks like this, once again with the "extra area" shown in red: The saved pgm file with extra area shown in red

If it's relevant, I am using this robot sim package: Rb Kairos Sim

I have tried launching gmapping with both the gmapping included in the rbkairos sim package ROS_NAMESPACE=robot roslaunch summit_xl_localization slam_gmapping.launch and also on its ownrosrun gmapping slam_gmapping scan:=/robot/front_laser/scan map:=/slam_gmapping/map

And this is the contents of my gmapping config:

map_frame: $(arg map_frame) base_frame: $(arg base_frame) odom_frame: $(arg odom_frame) map_udpate_interval: 2.0 maxUrange: 16.0 sigma: 0.05 kernelSize: 1 lstep: 0.05 astep: 0.05 iterations: 5 lsigma: 0.075 ogain: 3.0 lskip: 0 srr: 0.1 srt: 0.2 str: 0.1 stt: 0.2 linearUpdate: 0.2 angularUpdate: 0.1 temporalUpdate: 3.0 resampleThreshold: 0.5 particles: 100 xmin: -5.0 ymin: -5.0 xmax: 5.0 ymax: 5.0 delta: 0.05 llsamplerange: 0.01 llsamplestep: 0.01 lasamplerange: 0.005 lasamplestep: 0.005

edit retag flag offensive close merge delete