Sharing map with friends and backupping map

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Sharing map with friends and backupping map

blue_ringed_octopus
Hi, i'm trying to share a map with my friend, i sent him the rtabmap.db file, but it doesn't seems to work,

I also have a problem of the my old map being overwritten by the newest instance map when I boot up rtabmap. I made a copy of the old map and try to recover it by replacing the new map and then i call it by update cache from the rtabmap GUI, but it never worked, it seems like both map were overwritten at the same time.

I think both problems are the related in that I lack the understanding of how the db file is being used
Reply | Threaded
Open this post in threaded view
|

Re: Sharing map with friends and backupping map

matlabbe
Administrator
Hi,

i sent him the rtabmap.db file, but it doesn't seems to work
What is the error?

The workflow of rtabmap.db is the following. By default rtabmap will create or reuse ~/.ros/rtabmap.db on start. The path of the database is defined by "database_path" parameter (default ~/.ros/rtabmap.db). If you launch rtabmap node with "--delete_db_on_start" or "-d" argument, rtabmap will delete the database pointed by "database_path" and start from an empty map. If you launch without the previous arguments, rtabmap loads the map from the database and start from there.

The Edit->"update cache from a local copy... " action in rtabmapviz is just for updating the cache in rtabmapviz, it doesn't affect rtabmap node. This option is used to avoid to do Edit->Download all clouds... when the map is very large (>2GB). In this case, we copy the database of the robot on the remote computer, launch the robot with its map, then update the cache with the copy of the database on remote computer. This avoid downloading the whole map and save time.

Here is some examples with rtabmap.launch:
// Start from empty database (clear if it exists) located at "~/.ros/rtabmap.db" in SLAM mode
roslaunch rtabmap_ros rtabmap.launch args:="-d"

// Start with database located at "~/.ros/rtabmap.db" in localization mode
roslaunch rtabmap_ros rtabmap.launch localization:=true

// Start from empty database (clear if it exists) located at "~/my_map.db" in SLAM mode
roslaunch rtabmap_ros rtabmap.launch args:="-d" database_path:="~/my_map.db"

// Start with database located at "~/my_map.db" in localization mode
roslaunch rtabmap_ros rtabmap.launch database_path:="~/my_map.db" localization:=true