Getting only the first snapshot of the scans with gmapping [closed]
Hi, I've gone through one that seems to be a shared problem, as the following links testify
- http://answers.ros.org/question/218227/how-to-create-map-with-gmapping/
- http://answers.ros.org/question/32399/slam_gmapping-registering-first-scan-problem/
- http://answers.ros.org/question/200870/gmapping-calculate-only-first-laser-scan/
Some of them didn't received a satisfactory answers, while the successful replies to the others are not working for me.
I'm trying to make a map with an iRobot Create 2, using the irobotcreate2ros
node (https://github.com/MirkoFerrati/irobotcreate2ros), and using a Kinect as a sensor (from which I take the laser scan using the depth2laser
node https://github.com/mauriliodc/depth2laser). I changed the tf published by the irobotcreate2ros node, so that the frames are directly odom
and base_link
, instead of iRobot_0/odom
and iRobot_0/base_link
(as in the original version), and then I don't need a static_transformation_publisher (it shouldn't affect the general behavior, I suppose).
What happen is that when I start gmapping
, it seems to take only the first snapshot from the sensor, showing a small segment of the map, and not updating it while the robot moves. I tried both to see the realtime mapping in rviz and to try with a rosbag, but the result is always the same.
The following picture shows a snapshot or what I see in rviz
And the following picture instead shows my tfs (that are supposed to be correct, as far as I know)
I already checked that my odometry, the base_link, the xtion and the laser tf are consistent with each other (as they move accordingly in rviz). I've also a bag, but I cannot yet upload it. I'm searching a space where to do it. As soon as I find it, I'll edit this post.