Ask Your Question

how to edit gmapping.launch.xml?

asked 2019-12-19 05:09:15 -0500

noor gravatar image

updated 2019-12-19 06:28:50 -0500

I am using turtlebot with astra sensor on ros indigo. I am having issues with creating an accurate map. it does not matter if i use it with simulation only or also connect with real turtlebot I keep getting the same error messages during creating map process. *"Scan Matching Failed, using odometry, likelihood = some number"*

I am not getting any help from anywhere. I have tried to update gmapping.launch.xml but it is read-only, can you help me that how to update parameters in this file. here is my initial configuration when i run gmapping.

... logging to /home/turtlebot/.ros/log/e6e79614-2232-11ea-a1e8-802bf9015fcb/roslaunch-turtlebot-Inspiron-3185-3393.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost:39887/

SUMMARY PARAMETERS * /rosdistro: indigo * /rosversion: 1.11.21 * /slam_gmapping/angularUpdate: 0.436 * /slam_gmapping/astep: 0.05 * /slam_gmapping/base_frame: base_footprint * /slam_gmapping/delta: 0.05 * /slam_gmapping/iterations: 5 * /slam_gmapping/kernelSize: 1 * /slam_gmapping/lasamplerange: 0.005 * /slam_gmapping/lasamplestep: 0.005 * /slam_gmapping/linearUpdate: 0.5 * /slam_gmapping/llsamplerange: 0.01 * /slam_gmapping/llsamplestep: 0.01 * /slam_gmapping/lsigma: 0.075 * /slam_gmapping/lskip: 0 * /slam_gmapping/lstep: 0.05 * /slam_gmapping/map_update_interval: 5.0 * /slam_gmapping/maxRange: 8.0 * /slam_gmapping/maxUrange: 6.0 * /slam_gmapping/minimumScore: 200 * /slam_gmapping/odom_frame: odom * /slam_gmapping/ogain: 3.0 * /slam_gmapping/particles: 80 * /slam_gmapping/resampleThreshold: 0.5 * /slam_gmapping/sigma: 0.05 * /slam_gmapping/srr: 0.01 * /slam_gmapping/srt: 0.02 * /slam_gmapping/str: 0.01 * /slam_gmapping/stt: 0.02 * /slam_gmapping/temporalUpdate: -1.0 * /slam_gmapping/xmax: 1.0 * /slam_gmapping/xmin: -1.0 * /slam_gmapping/ymax: 1.0 * /slam_gmapping/ymin: -1.0

NODES / slam_gmapping (gmapping/slam_gmapping)


core service [/rosout] found process[slam_gmapping-1]: started with pid [3415] -maxUrange 6 -maxUrange 8 -sigma 0.05 -kernelSize 1 -lstep 0.05 -lobsGain 3 -astep 0.05 -srr 0.01 -srt 0.02 -str 0.01 -stt 0.02 -linearUpdate 0.5 -angularUpdate 0.436 -resampleThreshold 0.5 -xmin -1 -xmax 1 -ymin -1 -ymax 1 -delta 0.05 -particles 80 update frame 0 update ld=0 ad=0 Laser Pose= -0.0866988 0.048044 -0.00490948 m_count 0 Registering First Scan

edit retag flag offensive close merge delete


Can you please clarify what you are trying to do, what you expect to happen and what happens instead? And please improve the formatting of your question

ct2034 gravatar image ct2034  ( 2019-12-19 06:05:39 -0500 )edit

I am trying to create a map using roslaunch turtlebot_gazebo gmapping_demo.launch but generated map gives incorrect overlapping shapes and constantly gives error messages like "scan matching failed using odometry"

noor gravatar image noor  ( 2019-12-19 06:30:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-12-19 12:37:37 -0500

ct2034 gravatar image

I would advise creating your own package containing the launch files you need. You can copy the gmapping.launch.xml file into your own package and include it from your own package instead of the original location. Change sth like this <include file="$(find ORIGINAL_PACKAGE)/launch/includes/gmapping.launch.xml"/> into this <include file="$(find YOUR_PACKAGE)/launch/includes/gmapping.launch.xml"/>

Then you can edit the file in your own package and also keep track of the required configuration.

See this for best practice on launch files:

edit flag offensive delete link more


Thanks a lot, i ll give it a try, and does it mean that i should create all packages of turtlebot_navigation myself. as all are ready only. and they have their own hierarchy. if i need to update gmapping file name in gampping demo .launch which is again a read only resource.

second I am still confused about how to identify the suitable values for launch file's different parameters. because my main problem is that i could not get an accurate map and get overlapping shapes in map using default gmapping.launch.xml.

gampping launch has a number of parameters. such as

odom_frame, map_update_interval maxUrange maxRange sigma, kernelSize angularUpdate angularUpdate angularUpdate delta etc

noor gravatar image noor  ( 2019-12-20 02:28:09 -0500 )edit

No, you don't need to create everything yourself. Just one package with launch files. With the include tag, mentioned above you can then also include launch files from the original turtlebot packages. Only if you want to change something in the file, you have to create your one version and include that one, instead.

In terms of parameters, I would always start with the ones defined in the standard launch files and try to changes them from there. Often in ROS, parameters have also standard values that are used, when they are not defined in any launch file. You could also see what they are and try them.

ct2034 gravatar image ct2034  ( 2019-12-20 04:27:04 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2019-12-19 05:09:15 -0500

Seen: 248 times

Last updated: Dec 19 '19