ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Gmapping strange map

asked 2020-02-14 11:53:52 -0500

Luigi.giggi gravatar image

updated 2020-02-16 02:57:37 -0500

jayess gravatar image

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.

C:\fakepath\Schermata da 2020-02-14 17-30-55.png

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.

edit retag flag offensive close merge delete

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

jayess gravatar image jayess  ( 2020-02-14 17:35:19 -0500 )edit

How fast are you rotating? You should be rotating fairly slow otherwise you'll end up with similar results

jayess gravatar image jayess  ( 2020-02-14 17:44:31 -0500 )edit

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

Luigi.giggi gravatar image Luigi.giggi  ( 2020-02-15 02:15:34 -0500 )edit

Try going as slow as possible and see if that changes anything

jayess gravatar image jayess  ( 2020-02-16 02:58:03 -0500 )edit

just for mapping purposes, set all your speeds to as low as possible.

ashutosh08 gravatar image ashutosh08  ( 2020-02-17 04:36:22 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-05-14 04:31:34 -0500

Davies Ogunsina gravatar image

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-02-14 11:53:52 -0500

Seen: 418 times

Last updated: May 14 '22