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

Turtlebot SLAM gmapping parameter

asked 2020-07-05 08:38:52 -0600

rw1725 gravatar image

Hi, I am quite new to gmapping and I am seeking some advice regarding the gmapping parameter. So, I did a gmapping and the result (the map) is not quite good enough. As you can see in the attachment, the map bends to the left where it supposes to be straight as the red line.

I teleop my turtlebot (waffle pi) to move forward (upward in the map) at 0.1 m/s. I did stop it and made it turn around several times. The room size is about 3 m wide and 35 m long. My gmapping parameter is as below.

 <!-- Gmapping -->
 <node pkg="gmapping" type="slam_gmapping" name="turtlebot3_slam_gmapping" output="screen">
    <param name="base_frame" value="$(arg set_base_frame)"/>
    <param name="odom_frame" value="$(arg set_odom_frame)"/>
    <param name="map_frame"  value="$(arg set_map_frame)"/>
    <param name="map_update_interval" value="2.0"/>
    <param name="maxUrange" value="3.0"/>
    <param name="sigma" value="0.05"/>
    <param name="kernelSize" value="1"/>
    <param name="lstep" value="0.05"/>
    <param name="astep" value="0.05"/>
    <param name="iterations" value="5"/>
    <param name="lsigma" value="0.075"/>
    <param name="ogain" value="3.0"/>
    <param name="lskip" value="0"/>
    <param name="minimumScore" value="50"/>
    <param name="srr" value="0.1"/>
    <param name="srt" value="0.2"/>
    <param name="str" value="0.1"/>
    <param name="stt" value="0.2"/>
    <param name="linearUpdate" value="1.0"/>
    <param name="angularUpdate" value="0.2"/>
    <param name="temporalUpdate" value="0.5"/>
    <param name="resampleThreshold" value="0.5"/>
    <param name="particles" value="100"/>
    <param name="xmin" value="-10.0"/>
    <param name="ymin" value="-10.0"/>
    <param name="xmax" value="10.0"/>
    <param name="ymax" value="10.0"/>
    <param name="delta" value="0.05"/>
    <param name="llsamplerange" value="0.01"/>
    <param name="llsamplestep" value="0.01"/>
    <param name="lasamplerange" value="0.005"/>
    <param name="lasamplestep" value="0.005"/>
  </node>

I also checked the CPU usage, which is about 90% in total. So, I think map_update_interval is not a problem.

I know that the odometry isn't going to give the accurate pose or location, but can someone please tell me which parameter should I tune to get a better map? I read the ros programming book, but I still don't understand which parameters give the most impact on the result. I really appreciate some advice. Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-06 20:16:08 -0600

billy gravatar image

updated 2020-07-06 20:16:35 -0600

I see no reason to assume it is a gmapping parameter issue. Have you checked the accuracy of your ODOM? My guess is that your robot doesn't go straight when you tell it to go straight and that tuning the ODOM can improve the accuracy.

Line the robot up at one end of hall and drive down the hall next to the wall until you get to end. See how many encoder counts each wheel has accumulated. You may also find that you need to tune counts while rotating as well. Especially if you rotated the same direction each time while you were mapping. A small error caused by each rotation could accumulate.

http://wiki.ros.org/navigation/Tutori...

edit flag offensive delete link more

Comments

Hi billy! Thank you for your answer. Your guess is right, my robot doesn't move straight when I tell it to go straight. I read the link that you gave. The article just said the same thing as you said, nothing about how to tune the ODOM. Does changing the decay time of the laser scan can improve the ODOM? Can you tell me how can I tune my ODOM? Like which file should I look for.

rw1725 gravatar image rw1725  ( 2020-07-07 21:19:18 -0600 )edit

Somewhere in your setup there is a file that converts encoder counts to meters and meters/second to encoder counts/second. It may be parameters in a YAML file dealing with ODOM, or maybe it's camouflaged is an equation and converts wheel rotations by wheel radius. I can't say for sure.

It looks like you need to tweak one or more of the parameters or equations to account for whatever is creating the robot to not go straight.

You can also check the physical robot for issues that may cause the wheels to have different diameters (tape or dirt on the wheels) or maybe the wheels aren't aligned and one tends to slide a bit and has worn down over time.

I have an outdoor robot and I can tune ODOM by manipulating air pressure in the tires to change tire diameter. I can also do it ...(more)

billy gravatar image billy  ( 2020-07-08 01:40:57 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2020-07-05 08:38:52 -0600

Seen: 983 times

Last updated: Jul 06 '20