-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix Wrong Map Pointer (#3311) #3315
Conversation
Not assigning fixed map pointer to particle filter, using latest when resample. (cherry picked from commit cc6f205) Signed-off-by: Borong Yuan <yuanborong@hotmail.com>
@borongyuan, please properly fill in PR template in the future. @SteveMacenski, use this instead.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikeferguson can you let me know if this looks good to you? You have far more experience in the AMCL codebase than I.
So, comparing this against ROS1, this looks like it will work - but there may be other issues lurking:
|
Ugh. The person that migrated AMCL to ROS 2 had the best intentions of cleaning things up, but ended up creating more issues than solving problems. I'll merge in this fix for @borongyuan but this may be something that needs to be revisited in more detail if any more issues come up. It may be worth a re-port |
Not assigning fixed map pointer to particle filter, using latest when resample. (cherry picked from commit cc6f205) Signed-off-by: Borong Yuan <yuanborong@hotmail.com> Signed-off-by: Borong Yuan <yuanborong@hotmail.com>
Not assigning fixed map pointer to particle filter, using latest when resample. (cherry picked from commit cc6f205) Signed-off-by: Borong Yuan <yuanborong@hotmail.com> Signed-off-by: Borong Yuan <yuanborong@hotmail.com>
@SteveMacenski would you consider backporting this patch to Humble? |
It changes function signatures -- which is an ABI breaking change. Generally I wouldn't backport something but if this resolves a crash I'm more open to it. Can you confirm that you can reproduce a crash that this fully resolves (and understand why it resolves it)? |
I can confirm, under the exact same conditions described in #3311, BUT I don't have an MRE to share at hand. I can try and craft one. That said, the problematic execution path is more or less evident once you know where to look. The underlying particle filter is initialized on configure and upon dynamic re-parametrization, but the map gets clobbered and recreated every time a new occupancy grid gets published. It doesn't take much for the underlying particle filter to wind up with a non-owning reference to nothing, which doesn't become a problem unless adaptive resampling is enabled (and the particle filter tries to use that reference). |
OK. Backport in progress. AMCL is a codebase I haven't looked into for a few years. I read through it a few time as an exercise early in my career and intentionally avoided it afterwards for reasons I'm sure you and your team are all too familiar with ;-) |
Not assigning fixed map pointer to particle filter, using latest when resample. (cherry picked from commit cc6f205) Signed-off-by: Borong Yuan <yuanborong@hotmail.com> Signed-off-by: Borong Yuan <yuanborong@hotmail.com> (cherry picked from commit 85735ea) Co-authored-by: Borong Yuan <yuanborong@hotmail.com>
…s-navigation#3938) Not assigning fixed map pointer to particle filter, using latest when resample. (cherry picked from commit cc6f205) Signed-off-by: Borong Yuan <yuanborong@hotmail.com> Signed-off-by: Borong Yuan <yuanborong@hotmail.com> (cherry picked from commit 85735ea) Co-authored-by: Borong Yuan <yuanborong@hotmail.com>
…s-navigation#3938) Not assigning fixed map pointer to particle filter, using latest when resample. (cherry picked from commit cc6f205) Signed-off-by: Borong Yuan <yuanborong@hotmail.com> Signed-off-by: Borong Yuan <yuanborong@hotmail.com> (cherry picked from commit 85735ea) Co-authored-by: Borong Yuan <yuanborong@hotmail.com>
…s-navigation#3938) Not assigning fixed map pointer to particle filter, using latest when resample. (cherry picked from commit cc6f205) Signed-off-by: Borong Yuan <yuanborong@hotmail.com> Signed-off-by: Borong Yuan <yuanborong@hotmail.com> (cherry picked from commit 85735ea) Co-authored-by: Borong Yuan <yuanborong@hotmail.com>
Basic Info
Description of contribution in a few bullet points
Not assigning fixed map pointer to particle filter, using latest when resample.
Description of documentation updates required from your changes
Future work that may be required in bullet points
For Maintainers: