Gmapping strange map
Hello everyone,
I'm working on a project with Gmapping by using a Ydlidar X4 lidar mounted on a two wheeled robot with optical encoders. I've a problem with the map obtained via gmapping on rviz. After a bit of exploration of the robot, it looks like the attached picture.
The code I'm using is the same as the one I've previously developed for a gazebo-based simulation which was correctly working. It looks like the gmapping algorithm doesn't understand when the robot rotates, in fact as the robot moves on already explored zones, the map becames larger and larger (like if it was a new, unexplored zone). It's like the LaserScan readings behave like a sliding window, without reusing previously explored and constructed map. Of course the real map is much smaller and with less obtacles w.r.t the one created by gmapping.
In your opinion what could cause this behaviour? Is there any kind of parameter that I should have changed by switching to the "real" robot from the simulated one? IMHO I think it's related to the source of odometry. In the physical robot, I'm using two optical wheel encoders like these. They are pretty cheap hardware and they are not able to "understand" forward vs backward rotation. Do you think that if I change the source of odometry with a better one I could solve this problem?
Thanks in advance.
Asked by Luigi.giggi on 2020-02-14 12:53:52 UTC
Answers
Due to the encoder you are using . Your map will actually be distructed , reason why is because such encoders ain't built for such task ..it isn't stable when the robot is moving . .try and get incremental encoders the ones which are attached to the motors not the ones you have to attach.
Asked by Davies Ogunsina on 2022-05-14 04:31:34 UTC
Comments
@Luigi.giggi I've upvoted your question so that you have enough karma to upload your image to the question itself instead of linking to an external site
Asked by jayess on 2020-02-14 18:35:19 UTC
How fast are you rotating? You should be rotating fairly slow otherwise you'll end up with similar results
Asked by jayess on 2020-02-14 18:44:31 UTC
Hi, I'm rotating with an high value, specifically with angular.z=20. I had to use such a big number because otherwise my motors controller doesn't react to movements' msgs
Asked by Luigi.giggi on 2020-02-15 03:15:34 UTC
Try going as slow as possible and see if that changes anything
Asked by jayess on 2020-02-16 03:58:03 UTC
just for mapping purposes, set all your speeds to as low as possible.
Asked by ashutosh08 on 2020-02-17 05:36:22 UTC