stella-cv / stella_vslam

This is a unofficial fork of OpenVSLAM (https://github.com/xdspacelab/openvslam)
https://stella-cv.rtfd.io/en/latest/
Other
911 stars 390 forks source link

Small bug with request_reset() #543

Closed timbit123 closed 7 months ago

timbit123 commented 10 months ago

When we are trying to render a second video, we are creating a new system object and also just the be safe, we are also calling request_reset() but the reset is only called after the first frame is created (during feed_frame)

The issue is that data::frame::next_id_ was not reset to 0 before de creation of the first frame in create_monocular_frame

we are manually resetting it, but I would suggest maybe adding something to reset the value during the system constructor?

Thank you Tim

ymd-stella commented 10 months ago

Essentially, data::frame::next_id_ designed to be static seems to obscure handling of initialization and destruction. I'll see if I can move it to system::next_id_. Thanks for the report.

ymd-stella commented 7 months ago

Done. https://github.com/stella-cv/stella_vslam/pull/570

we can reset next_frameid to 0 by destroying system.

In addition, reset() will not set next_frameid to 0 after this change. I removed this feature because I thought it was unnecessary and confusing, but if you need it, please let me know.