ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to update gmapping continuously?

asked 2014-01-06 22:41:32 -0600

dneuhold gravatar image

updated 2014-01-28 17:18:58 -0600

ngrennan gravatar image

Hi all,

do someone know how to update the slam gmapping map more often. I need continuous updates in time. It should not longer depend on the degree of exploration. So far I did not manage it, quite long delays appear until the map is extended. I appreciate every hint ...

Thanks, Daniel

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
4

answered 2014-01-09 01:42:59 -0600

dneuhold gravatar image

Finally I localized the problem! Since I am using the turtlebot, I launch turtlebot_navigation gmapping_demo.launch. If you have a closer look at the launch file, you will recognize that the correct parameters to set are localized in the following launch file:

/opt/ros/groovy/stacks/turtlebot_apps/turtlebot_navigation/launch/includes/_gmapping.launch

Following parameters have a big impact on the update speed:

param name="map_update_interval" value="0.1" .... updates in sec
param name="delta" value="0.1" ...... grid of the map (here each block is 10cm * 10cm)
param name="particles" value="1" .... particles in the filer (default:30, which slows
down the updating procedure)
So I had to change these parameters and everything works fluently. Hope I could help you with my experience.

BR Daniel

edit flag offensive delete link more

Comments

Thanks for your answer, it really helped me too. I just wanted to add that it seems that modifying parameter when the slam_gmapping node is running with rosparam set DOESN'T WORK, you have to change the .launch file

Swan Baigne gravatar image Swan Baigne  ( 2015-07-17 02:21:51 -0600 )edit
1

answered 2014-01-06 23:49:44 -0600

The "map_update_interval parameter" as documented on the gmapping ROS wiki page allows setting the time between map updates in seconds. Other than that, playing with the "linearUpdate","angularUpdate" and "temporalUpdate" might be useful.

edit flag offensive delete link more

Comments

Thanks for your answer. I did this already ... here is my configuration: {angularUpdate: 0.1, astep: 0.05, base_frame: base_footprint, delta: 0.01, iterations: 5, kernelSize: 1, lasamplerange: 0.005, lasamplestep: 0.005, linearUpdate: 0.1, llsamplerange: 0.01, llsamplestep: 0.01, lsigma: 0.075, lskip: 0, lstep: 0.05, map_update_interval: 1, maxUrange: 4.5, obstacle_range: 5, odom_frame: odom, ogain: 3.0, particles: 50, raytrace_range: 5, resampleThreshold: 1, rolling_window: true, sigma: 0.05, srr: 0.01, srt: 0.02, static_map: false, str: 0.01, stt: 0.02, temporalUpdate: 0.1, xmax: 50.0, xmin: -50.0, 'xm~angularUpdate (float, default: 0.5) Process a scan each time the robot rotates this far in': -1.0, ymax: 50.0, ymin: -50.0} Did I set something wrong? Because my map is still updated with a high delay!

dneuhold gravatar image dneuhold  ( 2014-01-07 00:05:43 -0600 )edit
1

Dumb question: Could it be that the map is updated correctly, but you mean the visualization in rviz is delayed? Because the topic update depends on the map_update_interval parameter.

Tirjen gravatar image Tirjen  ( 2014-01-07 00:33:36 -0600 )edit

Yes, the visualization is delayed in rviz, but I also have the impression that FREESPACE is not available in my instantiated costmap until gmapping produces its map. What do you mean with : "the topic update depends on the map_update_interval parameter". Thanks for your answer!!

dneuhold gravatar image dneuhold  ( 2014-01-07 00:44:38 -0600 )edit

I mean that you can set the grid map topic update rate trough the parameter map_update_interval (default=5 seconds). If I understood well how gmapping works, this is only for visualization, while the map should be updated internally depending on other parameters. I don't understand your issue with the free space, can you explain it better,please?

Tirjen gravatar image Tirjen  ( 2014-01-07 01:15:06 -0600 )edit

Well my map_update parameter is set to 1sec, therefore it should be up to date in rviz, shouldn't it? But unfortunately it is not! My issue: While the robots moves, gmapping creates a map (which is created with a high delay). This map is the basis of an 2d costmap. Whenever the environment changes(due to the driving process of the robot) the underlying gmapping map but also the costmap SHOULD change. Now the instantiated costmap does change its values for OBSTACLE, INFLATED and UNKNOWN- SPACE but paradoxically not for FREESPACE. Now my suggestion was that FREESPACE is somehow bound to the underlying gmapping map, since new FREESPACE blocks are available in the costmap after an gmapping map update!! Therefore I need to update gmapping more often to obtain a more accurate costmap. If the update parameter just influence the visualization in rviz, the amount of FREESPACE blocks should ...(more)

dneuhold gravatar image dneuhold  ( 2014-01-07 01:39:37 -0600 )edit

Looking the corresponding code in gmapping, it looks like the map is only updated if some conditions are true (search for the updateMap() function here: http://docs.ros.org/hydro/api/gmapping/html/slam__gmapping_8cpp_source.html). Gmapping´s internal processScan function for example has to return true for a map update to happen. I´m currently not sure if your problem is a gmapping or move_base (setup) issue though.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2014-01-08 21:35:06 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2014-01-06 22:41:32 -0600

Seen: 6,020 times

Last updated: Jan 09 '14