Login  Register

Is rtabmap::close() synchronous?

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

Is rtabmap::close() synchronous?

scanboy
This post was updated on Aug 30, 2019; 1:44am.
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
| More
Print post
Permalink

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