-
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 bt_navigator crashes when restarted #3546
Fix bt_navigator crashes when restarted #3546
Conversation
get_parameter("navigators", navigator_ids); | ||
if (navigator_ids == default_navigator_ids) { |
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.
This block is strictly required to declare the types of the defaults. This is non-optional. Please readd default_navigator_types
definition and this block. You can use the nav2_utils::declare_if_not_declared
function so that it'll only redeclare on lifecycle transition if not already declared.
You could actually do that for navigators
too so that you didn't have to change anything other than 2 lines. That would actually be closer in line with best practices.
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.
Using declare_if_not_declared
was my first thought but it doesn't exist anymore.
Maybe default navigators are not necessary (yaml is always required) or I can also declare them in the constructor.
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.
I'm not sure what you mean by that, we have that in quite a few places in Nav2 😄
Its a nav2_utils
function
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.
My bad, I was looking for declare_if_not_declared
instead of declare_parameter_if_not_declared
...
I will make the modification.
Just minor fix to merge :-) |
@BriceRenaudeau every single system test failed - maybe you should rebase? I also retriggered the tests in case it was a fluke. It might be a problem with CI but I'm having issues with building the nightlys to even check relative. Rebase and push and if its still failing I'll take it as an action item to figure out why |
Actually I confirmed this was happening in other days builds. I'll need to look into that. Thanks! |
* Update bt_navigator.cpp * Clean uncrestify * Use declare_parameter_if_not_declared
* Update bt_navigator.cpp * Clean uncrestify * Use declare_parameter_if_not_declared Signed-off-by: enricosutera <enricosutera@outlook.com>
Basic Info
Description of contribution in a few bullet points
declare_parameter("navigators")
in the constructordefault_navigator_types
For Maintainers: