Robotics StackExchange | Archived questions

Bad results with Gmapping

Hey everyone,

I've got some trouble with gmapping.

I'm Using a robot called "eddie" witch is quiet similar to the Turtlebot2e, a kinect is the only used Sensor in this case. I wrote some nodes to get the Navigation Stack running( such as an odometry_publisher...) For the SLAM i thought gmapping would be a good choice. I used the Parameters they use with the turtlebot, but i get really bad results.

At first i thought my odometry could be the poblem. But the Odometry is realy good, as you can see on this Map (made with sigma and lsigma = 0 -> gmapping just used odometry. the robot did 21m of distance to create that map, asswell as all in all a rotation of 47rad(7,5 revolutions)) image description

As soon as I change the sigma and lsigma back to a usefull value the resulst get as bad as this: (made with the turtlebot paramters) you can see the large jump in the top right corner. most of the time gmapping says something like: Scan Matching Failed, using odometry. Likelihood=-3889.53 lp:3.94415 2.44182 -0.742944

if it can match the scans, it often jumps as in this case: image description

I use a notebook with an i7 620M (1st generation). Things i've tried:

-Recording bag file and play it with 10% speed ( to be sure, the notebook has enough power for gmapping)

Has anyone an idea why that happens? Thank you all so much!

Turtlebo Parameter:

  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <param name="base_frame" value="$(arg base_frame)"/>
    <param name="odom_frame" value="$(arg odom_frame)"/>
    <param name="map_update_interval" value="5.0"/>
    <param name="maxUrange" value="6.0"/>
    <param name="maxRange" value="8.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="200"/>
    <param name="srr" value="0.01"/>
    <param name="srt" value="0.02"/>
    <param name="str" value="0.01"/>
    <param name="stt" value="0.02"/>
    <param name="linearUpdate" value="0.5"/>
    <param name="angularUpdate" value="0.436"/>
    <param name="temporalUpdate" value="-1.0"/>
    <param name="resampleThreshold" value="0.5"/>
    <param name="particles" value="80"/>
  <!--
    <param name="xmin" value="-50.0"/>
    <param name="ymin" value="-50.0"/>
    <param name="xmax" value="50.0"/>
    <param name="ymax" value="50.0"/>
  make the starting size small for the benefit of the Android client's memory...
  -->
    <param name="xmin" value="-1.0"/>
    <param name="ymin" value="-1.0"/>
    <param name="xmax" value="1.0"/>
    <param name="ymax" value="1.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"/>
    <remap from="scan" to="$(arg scan_topic)"/>
</node>

EDIT: I did some testing wih the log-level of gmapping set to debug: thats whats it says:

I tried to set the queue size to a higher level, but that did not helped. i just filled the longer queue aswell. does it mean, my PC is to slow?

DEBUG] [1538559585.150380736]: scan processed
[DEBUG] [1538559585.150446754]: new best pose: -0.128 0.076 -0.620
[DEBUG] [1538559585.150473223]: odom pose: -0.120 0.053 -0.686
[DEBUG] [1538559585.150500220]: correction: -0.008 0.023 0.066
[DEBUG] [1538559585.150528985]: Update map
[DEBUG] [1538559585.150782022]: Trajectory tree:
[DEBUG] [1538559585.150814609]:   -0.128 0.076 -0.620
[DEBUG] [1538559585.161357391]:   -0.045 -0.222 0.803
[DEBUG] [1538559585.168895340]:   -0.143 0.204 -1.324
[DEBUG] [1538559585.173869257]:   0.065 0.103 -2.056
[DEBUG] [1538559585.177420176]:   -0.152 0.042 -0.406
[DEBUG] [1538559585.187483286]:   -0.150 -0.020 -0.007
[DEBUG] [1538559585.197457847]:   -0.150 -0.020 -0.007
[DEBUG] [1538559585.197514536]: Reading is NULL
[DEBUG] [1538559585.223851088]: XML-RPC call [searchParam] returned an error (-1): [Cannot find parameter [tf_prefix] in an upwards search]
[DEBUG] [1538559585.225146064]: Updated the map
[DEBUG] [1538559585.225245454]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559579.160, count now 0
[DEBUG] [1538559585.225295741]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559579.160, count now 0
[DEBUG] [1538559585.225386046]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559585.065, count now 0
[DEBUG] [1538559585.225419326]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559585.065, count now 0
[DEBUG] [1538559585.225465911]: Time jumped forward by [5.947389] for timer of period [0.010000], resetting timer (current=1538559585.225445, next_expected=1538559579.278055)
[DEBUG] [1538559585.225533946]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559585.100, count now 0
[DEBUG] [1538559585.225575190]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559585.100, count now 0
[DEBUG] [1538559585.225630832]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559585.134, count now 0
[DEBUG] [1538559585.225669168]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559585.134, count now 0
[DEBUG] [1538559585.225744209]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559585.166, count now 0
[DEBUG] [1538559585.225778349]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559585.166, count now 0
[DEBUG] [1538559585.225834130]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559585.200, count now 1
[DEBUG] [1538559585.237587305]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559585.234, count now 2
[DEBUG] [1538559585.279426741]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559585.266, count now 3
[DEBUG] [1538559585.308047359]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559585.200, count now 3
[DEBUG] [1538559585.308145273]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559585.234, count now 2
[DEBUG] [1538559585.308225755]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559585.266, count now 1
[DEBUG] [1538559585.319407034]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559585.300, count now 1
[DEBUG] [1538559585.375117040]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559585.334, count now 2
[DEBUG] [1538559585.411740875]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559585.366, count now 3
[DEBUG] [1538559585.462958310]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559585.300, count now 3
[DEBUG] [1538559585.463079060]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559585.334, count now 2
[DEBUG] [1538559585.463224687]: processing scan
update frame 128
update ld=0.22196 ad=1.63029
Laser Pose= 0.0969689 0.0981701 -2.31598
m_count 6
[DEBUG] [1538559585.607569543]: Incoming queue was full for topic "/scan". Discarded oldest message (current queue size [4])
Average Scan Matching Score=607.669
neff= 26.0462
Registering Scans:Done
[DEBUG] [1538559595.690054811]: scan processed
[DEBUG] [1538559595.690114562]: new best pose: 0.118 0.071 -2.147
[DEBUG] [1538559595.690143658]: odom pose: 0.097 0.098 -2.316
[DEBUG] [1538559595.690165491]: correction: 0.021 -0.028 0.169
[DEBUG] [1538559595.690199943]: Update map
[DEBUG] [1538559595.690394089]: Trajectory tree:
[DEBUG] [1538559595.690425120]:   0.118 0.071 -2.147
[DEBUG] [1538559595.693663045]:   -0.128 0.076 -0.620
[DEBUG] [1538559595.705506182]:   -0.045 -0.222 0.803
[DEBUG] [1538559595.715171118]:   -0.143 0.204 -1.324
[DEBUG] [1538559595.722136005]:   0.065 0.103 -2.056
[DEBUG] [1538559595.725753886]:   -0.152 0.042 -0.406
[DEBUG] [1538559595.734830849]:   -0.150 -0.020 -0.007
[DEBUG] [1538559595.744065359]:   -0.150 -0.020 -0.007
[DEBUG] [1538559595.744222020]: Reading is NULL
[DEBUG] [1538559595.769366833]: XML-RPC call [searchParam] returned an error (-1): [Cannot find parameter [tf_prefix] in an upwards search]
[DEBUG] [1538559595.770242004]: Updated the map
[DEBUG] [1538559595.770337280]: MessageFilter [target=odom ]: Discarding Message, in frame camera_depth_frame, Out of the back of Cache Time (stamp: 1538559585.366 + cache_length: 10.000 < latest_transform_time 1538559595.694. Message Count now: 1
[DEBUG] [1538559595.770394652]: MessageFilter [target=odom ]: Discarding Message, in frame camera_depth_frame, Out of the back of Cache Time (stamp: 1538559585.400 + cache_length: 10.000 < latest_transform_time 1538559595.694. Message Count now: 0
[DEBUG] [1538559595.770437227]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559585.400, count now 0
[DEBUG] [1538559595.770498694]: Time jumped forward by [10.295030] for timer of period [0.010000], resetting timer (current=1538559595.770474, next_expected=1538559585.475445)
[DEBUG] [1538559595.770588070]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559595.612, count now 0
[DEBUG] [1538559595.770630182]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.612, count now 0
[DEBUG] [1538559595.770696032]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559595.644, count now 0
[DEBUG] [1538559595.770739264]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.644, count now 0
[DEBUG] [1538559595.770803960]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559595.678, count now 0
[DEBUG] [1538559595.770846479]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.678, count now 0
[DEBUG] [1538559595.770920081]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.712, count now 1
[DEBUG] [1538559595.771004550]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.744, count now 2
[DEBUG] [1538559595.787615126]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.778, count now 3
[DEBUG] [1538559595.800774096]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559595.712, count now 3
[DEBUG] [1538559595.800885307]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559595.744, count now 2
[DEBUG] [1538559595.800953700]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559595.778, count now 1
[DEBUG] [1538559595.822037418]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.812, count now 1
[DEBUG] [1538559595.849479430]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.844, count now 2
[DEBUG] [1538559595.881678127]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.878, count now 3
[DEBUG] [1538559595.900898807]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559595.812, count now 3
[DEBUG] [1538559595.901085804]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559595.844, count now 2
[DEBUG] [1538559595.901208579]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559595.878, count now 1
[DEBUG] [1538559595.915414079]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.912, count now 1
[DEBUG] [1538559595.955287185]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.944, count now 2
[DEBUG] [1538559595.984224299]: MessageFilter [target=odom ]: Added message in frame camera_depth_frame at time 1538559595.978, count now 3
[DEBUG] [1538559596.001662834]: MessageFilter [target=odom ]: Message ready in frame camera_depth_frame at time 1538559595.912, count now 3
[DEBUG] [1538559596.001831103]: processing scan
update frame 129
update ld=0.290505 ad=2.59566
Laser Pose= -0.123896 -0.0905413 0.279682
m_count 7
[DEBUG] [1538559596.181815223]: Incoming queue was full for topic "/scan". Discarded oldest message (current queue size [4])
Scan Matching Failed, using odometry. Likelihood=-2710.29
lp:0.0969689 0.0981701 -2.31598
op:-0.123896 -0.0905413 0.279682
Scan Matching Failed, using odometry. Likelihood=-2703.43
lp:0.0969689 0.0981701 -2.31598
op:-0.123896 -0.0905413 0.279682
Scan Matching Failed, using odometry. Likelihood=-2770.2
lp:0.0969689 0.0981701 -2.31598
op:-0.123896 -0.0905413 0.279682
Scan Matching Failed, using odometry. Likelihood=-4266.67
lp:0.0969689 0.0981701 -2.31598
op:-0.123896 -0.0905413 0.279682
Average Scan Matching Score=201.877
neff= 18.4994
Registering Scans:Done
[DEBUG] [1538559599.578663418]: scan processed

Asked by lorenznew on 2018-10-02 09:01:51 UTC

Comments

Answers