Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

probably wrong code is activated in localization mode causing to memory leak #1443

Open
alexk1976 opened this issue Jan 27, 2025 · 1 comment

Comments

@alexk1976
Copy link

alexk1976 commented Jan 27, 2025

rtabmap.cpp
line 1754
the following code supposed to be activated in the mapping only but actually running also in localization mode and causing to memory leak over time:

_constraints.insert(std::make_pair(tmp.from(), tmp));

can you explain what is the purpose of _constraints ?
we tried to fix it to
if(signature->getLinks().size() &&
signature->getLinks().begin()->second.type() == Link::kNeighbor && _memory->isIncremental())

but got some errors that some nodes not found in the graph..
thanks

@matlabbe
Copy link
Member

matlabbe commented Feb 3, 2025

You are referring to this line:

_constraints.insert(std::make_pair(tmp.from(), tmp));

There is an answer here about the same question: http://official-rtab-map-forum.206.s1.nabble.com/memory-increase-when-robot-is-static-tp10863p10874.html

Can you add

UASSERT(_memory->isIncremental())

under this if statement:

// only in mapping mode we add a neighbor link
if(signature->getLinks().size() &&
signature->getLinks().begin()->second.type() == Link::kNeighbor)
{

then launch rtabmap with --udebug argument to show all debug logs. Run till it asserts there and post the whole debug log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants