...
POST No. 2407867
Wrong robot localization while using Turtlebot3 SLAM Gmapping (2)
2020-05-14 13:32:52 vietanhtran_uet

Hi everyone, 

I'm still struggling with the robot position in Rviz while using SLAM as I mentioned in the previous post. This time I used a better map with landmarks/feature points, but Rviz still display the robot localtion wrong

Command I used:

​roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping 


​Here is a picture of the hallway I used as the actual map:


 

I used 2 boxes as landmarks/feature points to make sure SLAM can work properly this time, but in RViz seems like the robot model is still moving faster than the actual robot, leading to wrong position in the end - the robot model went out of the map again:


Here is my TF tree:


Is something wrong with base_footprint or base_link? I checked my /odom topic and it seems still working correctly.

Here are my parameters in the launch file:

<launch>

  <!-- Arguments -->

  <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>

  <arg name="configuration_basename" default="turtlebot3_lds_2d.lua"/>

  <arg name="set_base_frame" default="base_footprint"/>

  <arg name="set_odom_frame" default="odom"/>

  <arg name="set_map_frame"  default="map"/>


  <!-- 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="1.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="0.2"/>

    <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>

</launch>


​Thanks a lot for your help!

2020-05-14 13:32:52
vietanhtran_uet
2020-05-18 16:12:48 Will Son

Hi, 

Could you try with the default gmapping parameters?

Also, please let me know your map.yaml file contents.

Thank you.

2020-05-18 16:12:48
willson
2020-05-22 16:07:19 Tran Viet Anh

Hi,

I used the default gmapping parameters on your github repo:

map_update_interval: 2.0

maxUrange: 3.0

sigma: 0.05

kernelSize: 1

lstep: 0.05

astep: 0.05

iterations: 5

lsigma: 0.075

ogain: 3.0

lskip: 0

minimumScore: 50

srr: 0.1

srt: 0.2

str: 0.1

stt: 0.2

linearUpdate: 1.0

angularUpdate: 0.2

temporalUpdate: 0.5

resampleThreshold: 0.5

particles: 100

xmin: -10.0

ymin: -10.0

xmax: 10.0

ymax: 10.0

delta: 0.05

llsamplerange: 0.01

llsamplestep: 0.01

lasamplerange: 0.005

lasamplestep: 0.005

​But the robot model on Rviz is still moving wrong, looks like the same when I ran on customized parameters.

Here are the contents of my map.yaml file:

image: /home/wade/mapfile.pgm

resolution: 0.050000

origin: [-10.000000, -10.000000, 0.000000]

negate: 0

occupied_thresh: 0.65

free_thresh: 0.196


​One more thing that hopefully can be helpful for you, I tried to ran the robot on the spiky carpet to make the wheels stuck and the robot would stay still, but on Rviz the robot model keep moving slightly forward, despite that the scanning and mapping still show the robot is staying at the same spot.


Thanks a lot for your help!


2020-05-22 16:07:19
vietanhtran_uet
2020-05-25 12:44:53 Will Son

Hi,


Have you modified the TurtleBot3 hardware or software?

Please update all source code in TurtleBot3 and your PC.

Could you give us more information on your development environment such as Ubuntu version and ROS version? 

We'll try with our robot and let you know the result.

Thank you.

2020-05-25 12:44:53
willson
Reply
웹에디터 시작 웹 에디터 끝