...
POST No. 2407913
TurtleBot3 waffle pi SLAM gmapping does not map correctly
2020-07-10 16:54:14 pejagalan

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 is not quite good enough. As you can see, 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. 

Since my waffle pi doesn't move straight, some people suggested to tune the odometry, but I can't find the way to tune the odometry in waffle pi.

Can anyone give me some advices so I can improve my map. I really appreciate some advices. Thanks!

2020-07-10 16:54:14
pejagalan
2020-07-10 18:10:18 Will Son

Hi,


If you are trying to create a map of long corridor, this could happen.

There could be many reasons for this, for example, slippery floor may cause error in odometry calculation.

In case of creating a map of wide area, cartographer might work better, so try with various options.

Thank you.

comment
2020-07-13 22:28:11 pejagalan
Hi, willson. Thank you for your reply.
I tried with hector mapping. The scanned map did get better, but it still bends.
I will try to use cartographer and see if I can get a better map.
2020-07-13 22:28:11
pejagalan
2020-07-10 18:10:18
willson
2020-07-15 17:11:46 Robby

Hi willson. Sorry this is quite out of the topic.

I installed cartographer by using

sudo apt-get install ros-kinetic-cartographer ros-kinetic-cartographer-ros ros-kinetic-cartographer-ros-msgs ros-kinetic-cartographer-rvi

Then, I tried to run it, but I got a error like this.

ERROR: cannot launch node of type [cartographer_ros/cartographer_occupancy_grid_node]: can't locate node [cartographer_occupancy_grid_node] in package [cartographer_ros]

After researching on the internet, apparently I suppose to use cartographer 0.3.0. So, I follow the installation step as in the e-manual.

However, when I tried to run it, I got the same error.

I really appreciate it if you help me with this error.

Thanks.


2020-07-15 17:11:46
pejagalan
2020-07-15 17:52:18 Will Son

Hi, 


Please refer to eManual in order to install Cartographer in ROS Kinetic.

https://emanual.robotis.com/docs/en/platform/turtlebot3/slam/#run-slam-nodes


TIP: We tested on cartographer version 0.3.0. The Cartographer package developed by Google supports 0.3.0 version in ROS Melodic, but 0.2.0 version in ROS Kinetic. So if you need to work on ROS Kinetic, instead of downloading the binaries files, you should download and build the source code as follows. Please refer to official wiki page for more detailed installation instructions.

on Ubuntu

$ sudo apt-get install ninja-build libceres-dev libprotobuf-dev protobuf-compiler libprotoc-dev
$ cd ~/catkin_ws/src
$ git clone https://github.com/googlecartographer/cartographer.git
$ git clone https://github.com/googlecartographer/cartographer_ros.git
$ cd ~/catkin_ws
$ src/cartographer/scripts/install_proto3.sh
$ rm -rf protobuf/
$ rosdep install --from-paths src --ignore-src -r -y --os=ubuntu:xenial
$ catkin_make_isolated --install --use-ninja
$ source ~/catkin_ws/install_isolated/setup.bash
$ roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=cartographer
comment
2020-07-16 10:21:10 pejagalan
Thank you for your reply.
I installed cartographer using the command that you give.
However, I still found the same error when using cartographer.
Is it because I installed cartographer using the apt-get first?
2020-07-16 10:21:10
pejagalan
2020-07-21 11:42:59 willson
I'm sorry for the delayed response.
If you have already installed cartographer, you should remove it before installing a new one.
You can delete pre-installed software with the command below.
$ sudo apt-get remove ros-kinetic-cartographer*
2020-07-21 11:42:59
willson
2020-07-15 17:52:18
willson
2020-07-23 16:55:17 Robby

Thanks for your reply, willson.

I successfully installed cartographer, and the scanned map is straight.

However, I have 2 issues with the scanned map.

First, when I start cartographer, the scanned map leans a little bit, although the robot is positioned to be straight.


Is it a hardware problem?


Second, I want to ask how to improve the scanned map.

My cartographer result is like here.


The area inside the red circles supposed to be a pillar, like in my first post.

However, as the robot moves, the space (the pillar) is removed and the distance in the map also decreases by about 0.5 m (the width of one pillar) for every pillar.

Can you tell me how to improve the scanned map?

Thank you.


2020-07-23 16:55:17
pejagalan
2020-07-24 15:10:47 Will Son

Hi,


You might want to search for more information from SLAM / cartographer community as I have less experience and knowledge about the algorithm.

In case of running the SLAM in a long hallway without any significant object as references may cause an issue as the algorithm will be difficult to identify the location based on matching data.

Try putting some obstacles in the random locations in the hallway and see if it resolves your problem.

Thank you.

comment
2020-07-25 21:30:13 pejagalan
Thank you for your advice.
I will try to place some obstacles randomly and see the result.
I just want to confirm about the first issue, is it also a software problem?
2020-07-25 21:30:13
pejagalan
2020-07-24 15:10:47
willson
Reply
웹에디터 시작 웹 에디터 끝