0
$\begingroup$

Rosanswers logo

Hi,

I have a mobile robot with Lidar sensor for mapping and localization in gazebo environment. i am using slam_gmapping for mapping.

My problem is about gmapping and its own parameters. It can create a map while my robot follow obstacle area and a unobstacle area. But when i follow a straight wall, gmapping make a missing map and my robot doesn't locate the true localization. You can look the youtube link for understanding my problem. How can i solve it?

Tanks all.


Originally posted by Murat on ROS Answers with karma: 55 on 2019-08-23

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

It's a common "issue" with gmapping, it's not really an issue because that is how the algorithm is working. In your video we can see that your robot has a limited angle of view (about 90°, from -45° to 45° apparently), so when your robot is following a straight wall at its right it doesn't detect anything else at his left (because of how far your walls are between each other).

What gmapping does for localization is comparing what the sensor is detecting with the map it is building. In your case the sensor always have the similar data because your wall is straight, that wouldn't be problematic if the robot encounter another obstacle a little further or if you could see the wall behind the robot. But your robot is getting always the same data and after a while it will consider that it's an issue, the algorithm will consider that the odometry data has been wrong (because odometry data can be very noisy, gmapping will give priority to the scan data over it) and will correct the robot position accordingly.

You have some options to avoid this :

  • If you are just using your simulation to test the mapping and don't care to change your gazebo world, you can add more obstacles that would be detected by the sensor when following the wall. But you could find the same issue if you add your obstacles symetrically and spaced at the same distance. Here's a picture to explain it better :

image description

  • You can change your SLAM algorithm to one that give more importance to the odometry, if your odometry data is good.
  • Maybe you can tune some of the gmapping parameters but I'm not sure about that.

Originally posted by Delb with karma: 3907 on 2019-08-23

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by duck-development on 2019-08-23:
Slam only is never the Solution. Lok at this book https://amzn.to/2L1K51G There is a Good descrition why

Comment by Delb on 2019-08-23:\

Slam only is never the Solution.

Can you detail a little bit more ? Do you meam SLAM based only on one source like odometry, or lidar, or IMU ?

Comment by Murat on 2019-08-23:
I am not using IMU or another sensors. There is only a Hokuyo Lidar scanner on the my robot. But how can i change my SLAM priority for odometry or LaserScan? can you recommend a source or document?

Comment by duck-development on 2019-08-23:
Slam only with lidar never work in real enviroments. You need a Bunch Office Sensors to handle the real world. Laser camera , depth Kameras, ultrasonic, encoders, im, GPS, Radar, ...

Comment by Murat on 2019-08-23:
Yeah. But i am working on simulation for now. i just wanna solve this issue in gazebo. that is my next goal for real environment and adding my others sensors. :)

Comment by Delb on 2019-08-23:
If you are only in simulaiton then just changing your Gazebo world would be a solution, just add a bunch of obstacles in so that the lidar can always detect several ones in its range.

What is the type of the real envirronment that you will put your robot into ?

Comment by Delb on 2019-08-23:
@duck-development Yes I agree that only one source isn't enough but you don't always require a camera AND ultrasonic sensor AND encoders etc, it's just too much. Some applications can work fine only with a lidar, imu and odometry. It just depends on how precize you want/need to be.

Comment by duck-development on 2019-08-23:
You can create an enviroment wehere an lidar is enought. But you create it. If you look at the xiaomi vac you get lds, imu, Encoder, extra ir Sensors, ultrasonic. and the look at every Part to Keep the Cost Down.

Comment by Murat on 2019-08-26:
@Delb Yes. The real environment is same with my gazebo simulation.

Comment by Murat on 2019-08-26:
But i can get the map at unobstacle environment. you can check it in this video on youtube

$\endgroup$
0
$\begingroup$

Rosanswers logo

finaly. i found it. just add <param name="minimumScore" value="260"/> parameter to slam_gmapping node. Because my laser range is 5m. I found this at the gmapping information section:

~minimumScore (float, default: 0.0) Minimum score for considering the outcome of the scan matching good. Can avoid jumping pose estimates in large open spaces when using laser scanners with limited range (e.g. 5m). Scores go up to 600+, try 50 for example when experiencing jumping estimate issues.

Thanks to @Delb and @duck-development


Originally posted by Murat with karma: 55 on 2019-08-26

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.