Is rtabmap::close() synchronous?

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

Is rtabmap::close() synchronous?

scanboy
This post was updated on .
Hi,

Is rtabmap::close() fully synchronous all the way down to the database being fully written to disk?

I see a problem occasionally when the Visual Words database is very large that some words are not properly saved and the power is cut some seconds after close() returns. At least it manifests with that all the VisualWords cannot be loaded when I load the database again.
Reply | Threaded
Open this post in threaded view
|

Re: Is rtabmap::close() synchronous?

matlabbe
Administrator
Hi,

When close() returns, the database file should be closed too, so everything should be saved. On ROS, we must be careful when we kill the launch file "ctrl-c", the process may be killed (escalation to sig-term) before the close() has finished. This can be fixed by increasing the wait time before ros force-kill a node (see https://answers.ros.org/question/11353/how-to-delay-escalation-to-sig-term-after-sending-sig-int-to-roslaunch/?answer=245912#post-id-245912).

cheers,
Mathieu