Manually edit the graph

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

Manually edit the graph

Alexandru Iftimie
Hello,

I am able to get the map and the global costmap, I am able to get and set the pixels values.

I want to know if there is a way of overwriting the map in the database because there are some pixels that are labeled wrong, such as the long stripes in the attached image.

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Manually edit the graph

matlabbe
Administrator
Hi,

No we cannot modify back the map in the database. You may try to filter the input data you are giving to rtabmap as a solution. If you are feeding laser scans, you may filter rays with values very different to their neighbors. If the 2d map is created from the depth image, then the depth image could be filtered for single depth pixels that are far from their neighbors (like an image salt-and-pepper noise filter).

There is another solution that could work only in localization: Do a mapping session as usual, save the final map with map_saver, edit the map image, restart rtabmap in localization mode, start in parallel a map_server with your modified map and feed this map to your navigation module instead. Normally both maps would be in same referential so that /map->/odom will also match the modified map.

Cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Manually edit the graph

Alexandru Iftimie
Thank you for your response Mathieu. Now I have another question.

I opened the database with sqlite browser. Is there any table / column that stores the grid map? I cannot find any explicit reference to it.

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Manually edit the graph

matlabbe
Administrator
Hi,

the global occupancy grid map is not explicitly saved in the database. Because of loop closure detection and memory management of RTAB-Map (see this paper), the global map is always reconstructed from local occupancy grid maps contained in each node of the current online map graph. In the database, the local occupancy grid maps are saved in Data table here. The coordinates of the cells are relative to the corresponding node, not the map.

It is why it is not trivial to modify them from the global map perspective. It could be feasible though with some programming by finding correspondences of a cell edited in global map to those in the local maps to modify the database.

cheers,
Mathieu