-
Notifications
You must be signed in to change notification settings - Fork 205
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
Delete frame_locked_markers when reusing marker #907
Conversation
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
While I like that idea in theory, I'm somewhat concerned about the performance implications of doing so. That is, one refactoring I could see would be to add a simple boolean flag to each marker to determine whether it is expired or frame locked. Then we would just have the Regardless, that is not what you are doing here, so I'll just review this code :). |
@Mergifyio backport humble galactic foxy |
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> (cherry picked from commit dbc240d)
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> (cherry picked from commit dbc240d)
✅ Backports have been created
|
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> (cherry picked from commit dbc240d)
Fixes #906
This makes sure to delete the marker from
frame_locked_markers_
when reusing an old marker.If a existing Marker is frame locked, but a new marker uses the same ID and is not frame locked then the marker in
markers_
gets deleted, but theframe_locked_markers_
entry was not. That was causing RViz to try to update markers that didn't exist.Separately, keeping separate
std::set
formarkers_with_expiration_
andframe_locked_markers_
seems like it's keeping state in two places. It might be worth refactoring this code in the future to iterate overmarkers_
instead of trying to keep three containers in sync.This PR is backportable