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

Slowdown over time #4

Open
djl11 opened this issue Aug 13, 2018 · 1 comment
Open

Slowdown over time #4

djl11 opened this issue Aug 13, 2018 · 1 comment

Comments

@djl11
Copy link

djl11 commented Aug 13, 2018

From my understanding, the list of trajectory points which is revealed by slam.get_trajectory_points() grows indefinitely. This both means that calls to slam.get_trajectory_points() take longer and longer to execute each time, eventually ceasing to meet real-time speeds, and the program would eventually eat up all the ram if left running for long enough. Is there any other way of retrieving just the most recent camera poses, which doesn't suffer from this slowdown?

(ps thanks for sharing these bindings)

@jskinn
Copy link
Owner

jskinn commented Aug 16, 2019

The problem is that ORB_SLAM2 needs to store the whole pose-graph to perform bundle adjustment and loop closure. When it detects a loop closure, it goes back and updates the estimated poses for the earlier frames.

So yes, the memory is going to grow significantly over time, which is part of the design of ORB_SLAM2. Managing this sounds like a hard problem.

In terms of these bindings, it should be possible to retrieve only the more recent frames (either just the current, or an index based approach might be interesting), but this doesn't stop ORB_SLAM2 from storing them, or reduce the memory.

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