Re: Adding an async external landmark
Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Adding-an-async-external-landmark-tp9592p9633.html
Hi,
That is a workflow that is not directly natively supported. As a workaround, some saved that kind of data (e.g., zones, places...) in a side file or in a new Table in the same database, linking to node_id they want, and possibly set a transform field. Another node can save/read data from rtabmap database at the same time rtabmap is using it. We should just make sure you don't play in same Tables at the same time.
With node_id=0, it will label the latest added node in mapping mode, or the closest node (inside RGBD/LocalRadius of current position) in localization mode.
Another workaround is to to call "get_nodes_in_radius" to know which is the closest node of request position, then add a landmark link directly in the database file in Link table with from_id=closest node and to_id= negative unique id. The next time rtabmap reloads the database, the place will be shown as a landmark with corresponding id in the graph. You may have to clear opt_poses and opt_ids in Admin table before relaunching rtabmap to make sure the graph is re-optimized with the new constraint.
cheers,
Mathieu