Localization drifting when slam_gmapping with RosAria and MobileSim
I'm working on a Pioneer LX robot and I'm currently trying to use slam_gmapping to create a map of an existing .map file by driving the robot around in the MobileSim simulator using the rosaria_client. However, I experience som weird errors when monitoring the map and laserscan in rviz. Initially, the map and the readings from the laserscan seem to overlap pretty well, but after driving around some obstacles and returning to the point I started the localization is totally off (see the images below). It seems to have lost some angular odometry after a while.
Images: MobileSim image and corresponding RVIZ image.
Are these tuning related issues? Since I use a simulator I assume that the sensors are tuned "perfectly". Any ideas of what's causing this?
edit: The error seems to occur if I rotate the robot a lot (>100 degrees ish) in one movement...
Some (maybe) relevant code:
gmapping.launch:
<launch>
<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
<remap from="scan" to="/RosAria/sim_S3Series_1_laserscan"/>
<param name="odom_frame" value="odom"/>
<param name="base_frame" value="base_link"/>
<param name="map_frame" value="map"/>
<param name="throttle_scans" value="1"/>
<param name="maxUrange" value="5.0"/>
<param name="maxRange" value="10.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="minimumScore" value="0.0"/>
<param name="lskip" value="0"/>
<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.1"/>
<param name="angularUpdate" value="0.05"/>
<param name="temporalUpdate" value="-1.0"/>
<param name="resampleThreshold" value="0.5"/>
<param name="particles" value="10"/>
<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.02"/>
<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>
</launch>
AMCL.launch:
<launch>
<node pkg="amcl" type="amcl" name="amcl" output="screen">
<remap from="scan" to="/RosAria/sim_S3Series_1_laserscan" />
<param name="odom_model_type" value="diff"/>
<param name="odom_alpha5" value="0.1"/>
<param name="transform_tolerance" value="0.2" />
<param name="gui_publish_rate" value="10.0"/>
<param name="laser_max_beams" value="30"/>
<param name="min_particles" value="500"/>
<param name="max_particles" value="5000"/>
<param name="kld_err" value="0.05"/>
<param name="kld_z" value="0.99"/>
<param name="odom_alpha1" value="0.2"/>
<param name="odom_alpha2" value="0.2"/>
<param name="odom_alpha3" value="0.8"/> ...