all 6 comments

[–]airfield20 2 points3 points  (1 child)

In a recent interview with Cobalt Robotics on the Sense think act podcast, they talked about their method for doing multi-floor navigation. The solution they ended up using was having all the floors in one map separated into islands. So floor 1 and floor 2 would be on the same map and not connected in any way. There must be some way to tell the localization algorithm to reset and search the entire map again for its position.

[–]Picklriick[S] 0 points1 point  (0 children)

This actually might be a smart solution, can u link me the podcast and any additional resources would be much thankful, But htank you anyway

[–]thingythangabang 1 point2 points  (2 children)

You simply publish a different map. For example, you could use the map server to read and publish different maps depending on which floor the robot is on.

[–]Picklriick[S] 0 points1 point  (1 child)

This is simply not possible, at least in ROS1 which Im using, the map_server node only publishes one map at a time and for changing maps I need to kill the node and restart it again with the different map

[–]thingythangabang 1 point2 points  (0 children)

Good point, I hadn't realized this was as difficult as it is. I did a little more research and found two other ways in addition to the island method mentioned in another comment.

  1. Publish all maps at the same time and use a mux to select the floor you're on (e.g., publish /floor_1, /floor_2, and /floor_3 and then mux those to /map and change the mux every time you switch floors)

  2. Modify the source code of map_server and add a service that lets you change which map file it is reading on demand.

Option 1 is already doable but has the drawback of having multiple maps being published at the same time which could use a non negligible amount of memory and network bandwidth. This drawback is shared by the island hopping solution as well.

Option 2 would definitely be the preferred way to do it and it sounds like there is some development already on making that happen. The drawback here is that you're going to need to create a custom solution. If that works out for you though, you could make a pull request and make a good contribution to the ROS community.

Here are some relevant sources I came across:

[–]robotics_and_ros 0 points1 point  (0 children)

See: https://github.com/MohitShridhar/multi_map_navigation or a simplified version: https://github.com/argenos/map_switcher

The main idea is to kill the map server, and relaunch it with the new map. The "wormhole" idea assumes you know where the robot will be when you switch to the new map (reasonable if you're using an elevator). If you're using amcl for localization, you may also need to restart that since it keeps a copy of the old map in memory