Ask Your Question
0

Gmapping SLAM does not work on a real Turtlebot3 waffle (no map received)

asked 2020-05-18 12:29:20 -0500

dhaour9x gravatar image

updated 2020-05-19 10:48:20 -0500

Hello, I hope you can help me. I have a real turtlebot3 waffle with an LSD sensor. I am trying to map my office but its not working. hrer are the lauch files of gmapping and turtlebot3_slam:

  • I have TurtleBot3 Waffle
  • ROS Kinetic Kame is working with TurtleBot3
  • Raspberry Pi 3(Single Board Computer) is working on TurtleBot3
  • Ubuntu MATE 16.04 installed in SBC
  • Ubuntu 16.04 LTS (Xenial Xerus) installed in Remote PC

I have tried to execute gmapping Slam with the following commands:

  1. -roslaunch turtlebot3_bringup turtlebot3_robot.launch

  2. roslaunch turtlebot3_slam turtlebo3_slam slam_methods:=gmapping

this is Issue:

... logging to /home/fsd/.ros/log/c4c4f2ce-99e3-11ea-8085-000c29a0d65b/roslaunch-ubuntu-4535.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:39949/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 50.0
 * /robot_state_publisher/tf_prefix: 
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /turtlebot3_slam_gmapping/angularUpdate: 0.2
 * /turtlebot3_slam_gmapping/astep: 0.05
 * /turtlebot3_slam_gmapping/base_frame: base_footprint
 * /turtlebot3_slam_gmapping/delta: 0.05
 * /turtlebot3_slam_gmapping/iterations: 5
 * /turtlebot3_slam_gmapping/kernelSize: 1
 * /turtlebot3_slam_gmapping/lasamplerange: 0.005
 * /turtlebot3_slam_gmapping/lasamplestep: 0.005
 * /turtlebot3_slam_gmapping/linearUpdate: 1.0
 * /turtlebot3_slam_gmapping/llsamplerange: 0.01
 * /turtlebot3_slam_gmapping/llsamplestep: 0.01
 * /turtlebot3_slam_gmapping/lsigma: 0.075
 * /turtlebot3_slam_gmapping/lskip: 0
 * /turtlebot3_slam_gmapping/lstep: 0.05
 * /turtlebot3_slam_gmapping/map_frame: map
 * /turtlebot3_slam_gmapping/map_update_interval: 2.0
 * /turtlebot3_slam_gmapping/maxUrange: 3.0
 * /turtlebot3_slam_gmapping/minimumScore: 50
 * /turtlebot3_slam_gmapping/odom_frame: odom
 * /turtlebot3_slam_gmapping/ogain: 3.0
 * /turtlebot3_slam_gmapping/particles: 100
 * /turtlebot3_slam_gmapping/pub_map_odom_transform: True
 * /turtlebot3_slam_gmapping/resampleThreshold: 0.5
 * /turtlebot3_slam_gmapping/sigma: 0.05
 * /turtlebot3_slam_gmapping/srr: 0.1
 * /turtlebot3_slam_gmapping/srt: 0.2
 * /turtlebot3_slam_gmapping/str: 0.1
 * /turtlebot3_slam_gmapping/stt: 0.2
 * /turtlebot3_slam_gmapping/temporalUpdate: 0.5
 * /turtlebot3_slam_gmapping/xmax: 100.0
 * /turtlebot3_slam_gmapping/xmin: -100.0
 * /turtlebot3_slam_gmapping/ymax: 100.0
 * /turtlebot3_slam_gmapping/ymin: -100.0

NODES
  /
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    rviz (rviz/rviz)
    turtlebot3_slam_gmapping (gmapping/slam_gmapping)

ROS_MASTER_URI=http://localhost:11311

process[robot_state_publisher-1]: started with pid [4564]
process[turtlebot3_slam_gmapping-2]: started with pid [4565]
process[rviz-3]: started with pid [4566]
[ WARN] [1543086745.282958810]: MessageFilter [target=odom ]: Dropped 100.00% of messages so far. Please turn the [ros.gmapping.message_notifier] rosconsole logger to DEBUG for more information.

image description

turtlebot3_slam.launch

     <launch>   <!-- Arguments -->   
    <arg name="model" default="waffle" doc="waffle"/>  
    > <arg name="slam_methods" default="gmapping" doc="slam type [gmapping,cartographer, hector          >karto,frontier_exploration]"/>   
    > <arg name="configuration_basename" default="turtlebot3_lds_2d.lua"/>  
    > <arg name="open_rviz" default="true"/>
    > 
    >   <!-- TurtleBot3 -->   <include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch">
    >     <arg name="model" value="$(arg model)" />   </include>
    > 
    >   <!-- SLAM: Gmapping, Cartographer,
    > Hector, Karto, Frontier_exploration,RTAB-Map -->   
    > <include file="$(find turtlebot3_slam)/launch/turtlebot3_$(arg slam_methods).launch">
    >     <arg name="model" value="$(arg model)"/>
    >     <arg name="configuration_basename" value="$(arg configuration_basename)"/>  
    > </include>
    > 
    >   <!-- rviz -->   <group if="$(arg open_rviz)"> 
    >     <node pkg="rviz" type="rviz" name="rviz" required="true"
    >           args="-d $(find turtlebot3_slam)/rviz/turtlebot3_$(arg slam_methods).rviz"/>   </group>
    > </launch>

     turtlebot3_gmapping.launch

> <launch>
>       <!-- Arguments -->
>       <arg name="model" default="waffle" doc="waffle"/>
>       <arg ...
(more)
edit retag flag offensive close merge delete

Comments

Please add the text from the error and remove the screen shot of it. It's always preferred to paste the text in and in this case I cannot read what the screenshot says.

billy gravatar image billy  ( 2020-05-18 21:40:29 -0500 )edit

Thank you. I have updated my question

dhaour9x gravatar image dhaour9x  ( 2020-05-19 10:50:17 -0500 )edit

After running bringup, check if the topics are being published or not using rostopic echo <topicName>

pravardhan gravatar image pravardhan  ( 2020-05-19 20:01:38 -0500 )edit

I have tested rostopic echo /scan and I got this:

header: 
  seq: 1537
  stamp: 
    secs: 1590484043
    nsecs: 808229021
  frame_id: "laser"
angle_min: 0.0
angle_max: 6.26573181152
angle_increment: 0.0174532923847
time_increment: 2.98800005112e-05
scan_time: 0.0
range_min: 0.119999997318
range_max: 3.5
ranges: [0.9120000004768372, 1.0010000467300415, 1.0019999742507935, 1.0019999742507935, 0.9319999814033508, 0.8730000257492065, 0.8799999952316284, 0.8870000243186951, 0.878000020980835, 0.8830000162124634, 0.9800000190734863, 1.093999981880188, 1.1119999885559082, 1.1080000400543213, 1.1039999723434448, 1.1069999933242798, 1.1180000305175781, 1.1150000095367432, 1.1260000467300415, 1.1130000352859497, 1.1390000581741333, 1.1160000562667847, 1.128000020980835, 1.1260000467300415, 1.1299999952316284, 1.1269999742507935, 1.1619999408721924, 1.1549999713897705, 1.024999976158142, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
dhaour9x gravatar image dhaour9x  ( 2020-05-26 04:10:38 -0500 )edit

Expand LaserScan in rviz and set the topic to /scan, looks like the values are being published correctly so they should be displayed in rviz without problem. Now to get the slam working I think the scan data must be published on /laser/scan topic instead of the /scan topic, please check with rosnode info what topic the gmapping node is subscribed to.

pravardhan gravatar image pravardhan  ( 2020-05-26 04:27:06 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-26 11:51:32 -0500

dhaour9x gravatar image

the Issue was solved withe the following commands. if you are using waffle platform, you can follow below waffle specific command.

Update OpenCR firmware from TurtleBot3 RPi

$ export OPENCR_PORT=/dev/ttyACM0
$ export OPENCR_MODEL=waffle
$ rm -rf ./opencr_update.tar.bz2
$ wget https://github.com/ROBOTIS-GIT/OpenCR-Binaries/raw/master/turtlebot3/ROS1/latest/opencr_update.tar.bz2 && tar -xvf opencr_update.tar.bz2 && cd ./opencr_update && ./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr && cd ..

Update the source code in your PC

$ cd ~/catkin_ws/src/turtlebot3
$ git pull
$ cd ~/catkin_ws && catkin_make

Then I launched below commands From PC,

$ roscore

from TurtleBot3

$ roslaunch turtlebot3_bringup turtlebot3_robot.launch

from PC,

$ export TURTLEBOT3_MODEL=waffle
$ roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-05-18 12:29:20 -0500

Seen: 36 times

Last updated: May 26