Hi
I didn't look that much into mapping with Pepper yet since I basically had the same results as you, that the maps were coming out pretty badly.
We move Pepper with a bluetooth ps4 controller via teleop.Doc:
http://wiki.ros.org/nao_teleop original:
https://github.com/ros-naoqi/nao_extras (our fork:
https://github.com/iai-pepper/nao_extras/tree/master/nao_teleop) You can also use other controllers. Xbox, ps3 or logitech ones work good and are not expensive. For the ps4 one there was a lot of adapting involved and that would be a whole other topic.
I found this tool for stitching Peppers laser data together:
https://github.com/iralabdisco/ira_laser_tools If I understood it correctly, it also takes into account the tf frames and positions of the sensors. So now we have the tree laser scanners on the same topic. Adjustments in the launch file were enough to do this.
https://github.com/iai-pepper/ira_laser_toolsIn my case I had a map which I recorded with a different robot which I used do far instead, since our focus was more on getting move base to run and an old map I had seemed to work so far.
So I haven't tried mapping yet with the new stitched sensor data...
There are a ton of parameters one can adjust within amcl and within gmapping. So it will be a lot of trial and error. I think setting up amcl properly is very important, since odometry depends on it. For mapping... the next thing I wanted to try was to reduce the resolution of the map. So far, I get 15 points per laser scanner, which is... not much. Makes 45 in total instead of the "usual" several hundred...
One can spend very much time on creating a map...
Another aproach wwe had with a different robot, and which worked nicely in the past, was wo drive the robot around the room, and record a bag file of the data. Avoiding unecessary rotations. Then we would playback the data into gmapping. Depending on the resolution of the laser scans, we would sometimes play it back slower then it was originaly recorded, to give gmapping more time to calculate stuff. Also with this aproach, one can tweak gmapping faster without having to drive the robot around every time.
Essentialy, it comes down to playing with the parameters. A lot. If I remember correctly, the "srr, srt" etc. parameters were important. I haven't tried it out yet to use my old gmapping file, since it was for a robot which had a laser scanner of about 200 degrees... but maybe it can help?
https://github.com/suturo16/sut_tortugabot/blob/master/launch/gmapping_suturo.launchI'll keep you posted if I make any progress on this.
Cheers!
Hasu
PS: if you directly fork any of my stuff you might need to remove the ns=group "pepper_robot" in the launch files or the "pepper_robot" prefix from some of the topics. ^^