How to remove a session from a multi-session map?

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

How to remove a session from a multi-session map?

felipeduque
Hi. I'm trying to build a somewhat large map, so several sessions are in need. But sometimes a mapping session is not very well succeeded because of drift - even with correct loop closures with previous sessions. I believe it happens because I'm on a simulated environment, with some low-textured objects.

How easy is it to remove a single session from a .db? I believe I can do it code-wise, since I know the first and last IDs to be removed, but maybe it will mess with the whole map because of the metric constrains with other nodes...
Reply | Threaded
Open this post in threaded view
|

Re: How to remove a session from a multi-session map?

stellaa9x
the same question, waiting cmt
Reply | Threaded
Open this post in threaded view
|

Re: How to remove a session from a multi-session map?

matlabbe
Administrator
This post was updated on .
You could get the first and last node of a particular session with (here the first session "0"):
sqlite3 rtabmap.db "select min(id) from Node where map_id=0"
sqlite3 rtabmap.db "select max(id) from Node where map_id=0"

# to get all map ids in the database:
sqlite3 rtabmap.db "select distinct(map_id) from Node"
then use those ids with the commands of option 2 of that post.

cheers,
Mathieu