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

updating the map partially in a dynamic environment

asked 2021-01-18 23:06:49 -0600

So Young gravatar image

updated 2021-01-18 23:33:03 -0600

Hello,

I have generated map.pgm with gmapping using teleoperation and RPLidar, and I am using this map for navigation stack. The problem is, since the environment (indoor office) changes a lot, it struggles with amcl which causes inaccurate navigation. It works okay when there are minor changes but when the desk is moved or some chairs are moved to other side, it struggles.

image description

I believe there are three possible options for this problem, (If there are other good solutions please let me know, thank you!)

  1. re generate the whole map using gmapping and teleportation -> easy but time consuming (not what I want to do)
  2. re generate the whole map using gmapping & exploration (auto-SLAM & auto-Navigation) -> couldn't find a good solution (have tried explore_lite but it kept going under the desk or get stuck due to clustered environment)
  3. use the previous map and and set some points on the map that robot should visit & update the map during this process.

I was wondering if there is a way to do the third option. I can create a node that sends out move_base goals and my navigation stack works. Is there any way to update already made map (made by gmapping) ?

Since the already-made map used by navigation stack will be published by map_server, if there is a way to update the map and then save the map by map_saver, i will be able to solve this problem. Thank you for your help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-04-16 00:18:55 -0600

So Young gravatar image

I've done option3 , and the important thing is to localize (AMCL) & visit points (move_base) the robot with 'previously built old map' and run gmapping at the same time (as I mentioned earlier in my Question, I made a node that publishes move_base goals- the visit points were selected before.). But make sure to change odom_frame param in slam_gammping node to odom2 or something (just to be different from default odom) so that gmapping doesn't interfere with the current odom used in move_base & AMCL at the moment.

edit flag offensive delete link more

Comments

Can you please explain a little bit more how you did this? If I run the robot with 'previously built old map' and run gmapping at the same time the map is reset to a new one and I lose all the previously map data.

rezenders gravatar image rezenders  ( 2021-05-12 07:03:20 -0600 )edit
1

Hi, I couldn't find a way to 'partially' update the previously built map. Instead, I worte a simple node that turns on the gmapping and publishes move_base goals and rotate every time it reaches each goal (for instance, visiting point A and rotate, then go to point B and rotate and then so on.. ) so I could imitate the key-operation mapping. whilst doing this, I made sure the gmapping odom frame was set to 'odom2' or something that is different to original 'odom' frame of the AMCL, so that it doesn't interfere with previous move_base or AMCL. after the mapping is done, you'll get a map of the area with 'same frame', and obviously this is a new map that can replace the previous map. However, in terms of changing the map partially, you can probably cut a part of this new map and then attach it ...(more)

So Young gravatar image So Young  ( 2021-05-12 19:20:18 -0600 )edit

do you launch slam and navigation on same rviz window or seperate rviz window for both?

loveson gravatar image loveson  ( 2023-07-12 01:40:00 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2021-01-18 23:06:49 -0600

Seen: 1,059 times

Last updated: Apr 16 '21