rosbag and real robots?
So I was using this tutorial to map out the floor in at my school. The map is beautiful.
http://www.ros.org/wiki/slam_gmapping/Tutorials/MappingFromLoggedData
However, once I am done with the bag file I want to use the map for the real robot. I have the robot end, where I plan on starting the robot in the future. Then I start the Segwary RMP driver and with the laser scan. First problem occurs gmapping (Note: It HAS NOT been restarted) will begin mapping in a completely different place.
So I hacked the driver and offset the coordinates by the ending coordinates in /map tf frame. Gmapping appears to get it correct at this point. But when I try to move 1 meter forward it will turn toward the wall and essentially run into it. However, I get the coordinates from goal generated by rviz. The other weird part is I have to subtract the map coordinates from the goal. (It has to be in terms of base link.) Not a huge issue but a weird one.
I am using the move_base find path service.
I have spent a better part of a month trying to get this to work. At first I tried to play with the ros time and sim time, but that didn't seem to help.
I have also tried amcl but the localizer crashes when it gets even a meter off. gmapping's localizer for whatever reason works really well.
So question 1: Can I use a rosbag to create a map in gmapping AND use a real robot on it. (It worked great on the simulator)
Question 2:) How do I get the robot driver to "start" at the same location the mapper left off. Considering it was the same location that the mapper started and is the same location that the robot is currently in.
If I can't do either of these two things then I am in trouble, thanks for the help in advance.
Cheers.
I have similar kind of problem in creating a 2D global map. I have not been able to generate the bag file. But my slam_gmapping node appears in rxgraph output. How you come to know that gmapping started or not? My question is here http://answers.ros.org/question/94671/error-in-creating-2d-global-map-of-the-environment/