0
$\begingroup$

Rosanswers logo

Hi,

I'm using a Turtlebot 2 on ROS Hydro on Ubuntu 12.04 64-bit. Recently I replaced my bot's Kinect with a Hokuyo URG-04LX. Since then, I've been getting much better maps of my office building in terms of where hallways and cubicles should be. However, there is a weird new phenomenon I haven't been able to isolate the cause of.

Namely, walls that should be straight are a series of short parallel line segments that are all off by some angle. This happens for even a simple test where I drove the robot in a straight line down a hallway: image description

I had thought maybe there was something wrong with the numbers on the transform from the base to the Hokuyo that I was manually publishing, but now I'm not sure; if I run RViz while playing the same bagfile, set the global fixed frame to /odom, turn off the map, and set the LaserScan decay to 300, I can get a "map" that actually looks very good, like so:

image description

Note that, in this image, the map has a perfectly straight hallway. This is the result of using the same arguments to the static transform publisher (shown in the script window). So if I'm correct (am I...?), the fact that this map looks good rules out bad transform arguments as well as bad odometry.

Watching the GMapping process in RViz, I can see that as the robot drives forward, every few seconds, its pose seems to consistently jump to the left, which is why the output gets that skewed map. It doesn't look like I'm allowed to post videos here, but if it helps, I can go create a YouTube account and share a recording of what this looks like.

I've tried several things, including slowing the bagfile down 10x, changing the map resolution (delta), and throttling the scans in GMapping. Nothing really changes the consistent jumping. My GMapping launch file is as follows (currently using the default arguments):

<launch>
  <arg name="scan_topic" default="scan" />
  <arg name="srr" default="0.01"/>
  <arg name="srt" default="0.02"/>
  <arg name="str" default="0.01"/>
  <arg name="stt" default="0.02"/>
  <arg name="lU" default="0.5"/>
  <arg name="aU" default="0.436"/>
  <arg name="mU" default="20"/>



  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <param name="base_frame" value="base_footprint"/>
    <param name="odom_frame" value="odom"/>
    <param name="map_update_interval" value="$(arg mU)"/>
    <param name="maxUrange" value="3.5"/>
    <param name="maxRange" value="8"/>
    <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="srr" value="$(arg srr)"/>
    <param name="srt" value="$(arg srt)"/>
    <param name="str" value="$(arg str)"/>
    <param name="stt" value="$(arg stt)"/>
    <param name="linearUpdate" value="$(arg lU)"/>
    <param name="angularUpdate" value="$(arg aU)"/>
    <param name="temporalUpdate" value="-1.0"/>
    <param name="resampleThreshold" value="0.5"/>
    <param name="particles" value="130"/>

    <param name="xmin" value="-30.0"/>
    <param name="ymin" value="-30.0"/>
    <param name="xmax" value="30.0"/>
    <param name="ymax" value="30.0"/>

<!--
    <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"/>
    <param name="throttle_scans" value="1"/>
    <remap from="scan" to="$(arg scan_topic)"/>
  </node>
</launch>

Can anyone please offer suggestions as to what may be causing this? Thanks in advance.


Originally posted by BlitherPants on ROS Answers with karma: 504 on 2014-09-29

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Take a look at this ROS answer, can have interesting information for you. Specially, setting the minimumScore parameter to something like 100 or higher should avoid the jumps. The answer itself and the gmapping ROS wiki give you an explanation of what's going on. Also this PR can help.

Btw, the minimumScore has been edited on TB2's gmapping demo (https://github.com/turtlebot/turtlebot_apps/pull/109) but I think only on indgo


Originally posted by jorge with karma: 2284 on 2014-10-03

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by BlitherPants on 2014-10-03:
I had already tried setting minimumScore to the ballpark of 1000 but just now I tried it at 1000000 and the behavior still didn't change. Strangely enough, I don't see any scan matching fails in the gmapwindow. Stranger, if I set str, etc to 0 and particles to 1 to remove SLAM it still jumps...

Comment by BlitherPants on 2014-10-07:
OK so, after allowing the ROS packages to update for the first time in a few months, I can get the scan matching to fail. Putting a really high score does make it rely only on odometry now, and while that does make the straight line maps look great, mapping a large building doesn't work...

$\endgroup$

Your Answer

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