-
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
[nav2_costmap_2d] add the std::unique_lock
before layered_costmap->isCurrent()
#3958
Conversation
Makes sense! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3958 +/- ##
==========================================
- Coverage 90.35% 90.34% -0.01%
==========================================
Files 417 415 -2
Lines 18516 18469 -47
==========================================
- Hits 16730 16686 -44
+ Misses 1786 1783 -3 ☔ View full report in Codecov by Sentry. |
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
@GoesM, your PR has failed to build. Please check CI outputs and resolve issues. |
Looking at the code - there is a lock for |
Looking at the code of planner/controller server, The state of
So they belongs to two different threads. However they two different threads both have the right to access, change and free the same pointer Thus, one thread keep accessing the pointer while another one could reset the same pointer at the same time, which caused the bug. For more details, we're going to describe the conflict from both logical analysis and experimental results, shown in later comments |
code-logic anaylysismutilple threads go horizontally and they all have rights to free and access the same pointer.why it isn't enough to avoid this fault by adding a check (
|
experimental resultsCore Experimental InfoFrom the code coverage results, our code line for NullPtr check has not been covered. It should be because of the limitation of existing test set, difficult to simulate scenarios where external obstacles randomly and frequently move. In our simulation, we attempted to simulate scenarios where external obstacles frequently change and move randomly; Additionally, we have inserted a log prompt in our 'NullPtr check' to prove that it has indeed had a practical effect. //we try it by
bool isCurrent()
{
RCLCPP_INFO(get_logger(), "--------------------in isCurrent()-------------------");
//lock because no ptr-access is allowed until other ptr-free finished
std::unique_lock<Costmap2D::mutex_t> lock(*access_);
if ( layered_costmap_ == nullptr ) {
RCLCPP_INFO(get_logger(), "[!]------nullptr catched after lock()-----------[!]");
return false;// to avoid nullptr accessed
}
return layered_costmap_->isCurrent();
} in
[!][!][!] this log strongly shows that: global_costmap could do Other Experimental Info<1> To check if the problem is caused by "layered_costmap_ is a NullPtr"Firstly, we only add the lock between However, which is tried without a nullptr check, so that we get an asan_report frequently:
!!! focus on address 0x000000000048, which is similar with a Therefore, we executed //we try it by:
bool isCurrent()
{
//insert .reset() to check
layered_costmap_.reset();
return layered_costmap_->isCurrent();
}
//any other code wasn't changed
[!][!][!] this asan_report strongly shows that: <2> To check if the problem is caused by "layered_costmap_ is a NullPtr"very begin of our ISSUE #3940, we provided an asan_report:
also focus on address 0x0000000000a1, which is similar with a similarly, we tried add [!][!][!] it additionally strongly shows that: |
A SUMMARYIt should be one of concurrency vulnerability types , named as atomicity violation Simply put, the cause of the entire bug is:Although During the execution of Thus, the release of the relevant pointer was performed, resulting in a segment error (SEGV). The following two conditions create prerequisites for such bugs
Our suggestion for this type of bugTo fix this type of bug, our suggested method is to use Of course, you can also adjust the permissions of each thread to achieve repairs, but this may affect the construction of the entire nav2 code framework, which is worried by us. by the way, it seems that this bug would occur in crowded and fast-riding scenrios randomly, so may be meaningful for nav2-program ^_^ Hoping that our description is clear to be understood ~ : ) |
@@ -360,6 +363,8 @@ Costmap2DROS::on_cleanup(const rclcpp_lifecycle::State & /*state*/) | |||
|
|||
layer_publishers_.clear(); | |||
|
|||
//lock because no ptr-access is allowed until this ptr-free finished | |||
std::unique_lock<Costmap2D::mutex_t> lock(*access_); |
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.
Is there anywhere else we should be locking the layered_costmap_ as well?
Incorrect, the I don't see how this is possible, I'm not saying that you're wrong, but that analysis is incorrect and I want to understand exactly what is happening before taking action - since this could potentially not be the right action or not fully resolve the issue If the server was attempted to do when either action server was deactivated and the goal was still processing: It is technically possible for In which case, this would only happen on the system stopping due to a control + C or other user-requested event to stop the program - not just randomly during execution. Is this only a shutdown issue or something mid-execution? |
Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
uh so that's what you mean! Thanks a lot for your reminder, I confused the two different error situations in my previous description and understanding. Situation 1: it caused that Situation 2: Do it caused that For the situation 1, it occurs during the normal execution of the program For the situation 2, it occurs after node's pre-shutdown We got mixed up roles of 'clear_ costmap_ service ' and ' on_cleanup ', so mistakenly thought that our solution could solve both situations at the same time. Now, it seems that our current method only solves situation 2. Thus, the error in situation 1 should still be triggered in our subsequent testing. If we have any new results, we will proactively share them with you. This PR/ISSUE can be considered as a solution for users' pre-shutdown . If there's something new happens with situation 1 again, we'd create a new ISSUE or PR to share it. |
If we have a situation that is mostly due to shutdown mechanics, I'd rather modify the shutdown mechanics than introduce a new mutex. For instance, reorder the shutdown mechanics so that the situation that is happening now is impossible by destroying the objects, resetting them, or adding another |
we like not to do so to aid only in shutdown mechanics, as well. however that has been the only successful method in our local test... SO we come up with a completely new way to fix the bug, discard creating a new mutex, and only add double check as following: //in file `planer_server.cpp`
nav2_util::CallbackReturn
PlannerServer::on_cleanup(const rclcpp_lifecycle::State & /*state*/)
{
RCLCPP_INFO(get_logger(), "Cleaning up");
//double check whether action_server is running..+
if(action_server_pose_->is_running()){
action_server_pose_->deactivate();
}
action_server_pose_.reset();
//double check as well
if(action_server_poses_->is_running()){
action_server_poses_->deactivate();
}
action_server_poses_.reset();
plan_publisher_.reset();
tf_.reset();
...
...
... Furthermore, we obtained some new experimental info, which may be helpful for you to understand why we do so
it seems that because by the code, BUT, following its real behavior, I guess there's some other mechanics that would make As a result, we try to solve it by add a double check in thus,
Hoping our experimental info helpful for you. as we changed it too many times, if you like the new solution, we'd like to pull it in a new PR and close this one. : ) or if you need the method to |
I've changed my code following your "changes requested", while it seems the CI failed in places we didn't change |
Yeah, not your fault, that's mine #3969. The linter profiles changed recently and that PR was still using the old linting profile in CI so it didn't catch before.
That does not seem possible to me. Specifically, how are you bringing down the system? Are you properly calling deactivate -> cleanup -> shutdown or just going directly there? Are you using our lifecycle manager tool?
This is incorrect. Yes, that would make sense to close this PR and open this new one -- or just make the changes here, that's up to you. We can delete the current mutex work though. |
actually, we very normally launch the nav2 by and we shutdown it also normally by sending a finally, we got log files going directly here. As you can see,
we're also confused why costmap deactivate and cleanup firstly ... it strongly shows that there's some previous shutdown mechanics to make thus, that's why I said:
|
i'd like to try it in our future work . <(^-^)> |
* bug fixed * add space * Update planner_server.cpp * add space for code style * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add ChildLifecycleNode mode in costmap_2d_ros * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower * fit to NodeOption: is_lifecycle_follower * fit reorder Werror * fix wrong use of is_lifecycle_follower * remove blank line * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * Add files via upload * NodeOption: is_lifecycle_follower_ * NodeOption:is_lifecycle_follower_ * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * change default * add NodeOption for costmap_2d_ros * add node options for costmap2dros as an independent node * code style reformat * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * changes * comment changes * change get_parameter into =false * comment modification * missing line * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * delete last line * change lifecycle_test fit to NodeOption --------- Co-authored-by: GoesM <GoesM@buaa.edu.cn> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
* bug fixed * add space * Update planner_server.cpp * add space for code style * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add ChildLifecycleNode mode in costmap_2d_ros * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower * fit to NodeOption: is_lifecycle_follower * fit reorder Werror * fix wrong use of is_lifecycle_follower * remove blank line * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * Add files via upload * NodeOption: is_lifecycle_follower_ * NodeOption:is_lifecycle_follower_ * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * change default * add NodeOption for costmap_2d_ros * add node options for costmap2dros as an independent node * code style reformat * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * changes * comment changes * change get_parameter into =false * comment modification * missing line * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * delete last line * change lifecycle_test fit to NodeOption --------- Co-authored-by: GoesM <GoesM@buaa.edu.cn> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
* bug fixed * add space * Update planner_server.cpp * add space for code style * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add ChildLifecycleNode mode in costmap_2d_ros * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower * fit to NodeOption: is_lifecycle_follower * fit reorder Werror * fix wrong use of is_lifecycle_follower * remove blank line * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * Add files via upload * NodeOption: is_lifecycle_follower_ * NodeOption:is_lifecycle_follower_ * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * change default * add NodeOption for costmap_2d_ros * add node options for costmap2dros as an independent node * code style reformat * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * changes * comment changes * change get_parameter into =false * comment modification * missing line * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * delete last line * change lifecycle_test fit to NodeOption --------- Co-authored-by: GoesM <GoesM@buaa.edu.cn> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: gg <josho.wallace@gmail.com>
* bug fixed * add space * Update planner_server.cpp * add space for code style * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add ChildLifecycleNode mode in costmap_2d_ros * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower * fit to NodeOption: is_lifecycle_follower * fit reorder Werror * fix wrong use of is_lifecycle_follower * remove blank line * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * Add files via upload * NodeOption: is_lifecycle_follower_ * NodeOption:is_lifecycle_follower_ * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * change default * add NodeOption for costmap_2d_ros * add node options for costmap2dros as an independent node * code style reformat * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * changes * comment changes * change get_parameter into =false * comment modification * missing line * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * delete last line * change lifecycle_test fit to NodeOption --------- Co-authored-by: GoesM <GoesM@buaa.edu.cn> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: enricosutera <enricosutera@outlook.com>
* bug fixed * add space * Update planner_server.cpp * add space for code style * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add ChildLifecycleNode mode in costmap_2d_ros * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower * fit to NodeOption: is_lifecycle_follower * fit reorder Werror * fix wrong use of is_lifecycle_follower * remove blank line * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * Add files via upload * NodeOption: is_lifecycle_follower_ * NodeOption:is_lifecycle_follower_ * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * change default * add NodeOption for costmap_2d_ros * add node options for costmap2dros as an independent node * code style reformat * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * changes * comment changes * change get_parameter into =false * comment modification * missing line * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * delete last line * change lifecycle_test fit to NodeOption --------- Co-authored-by: GoesM <GoesM@buaa.edu.cn> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
* bug fixed * add space * Update planner_server.cpp * add space for code style * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add ChildLifecycleNode mode in costmap_2d_ros * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower * fit to NodeOption: is_lifecycle_follower * fit reorder Werror * fix wrong use of is_lifecycle_follower * remove blank line * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * Add files via upload * NodeOption: is_lifecycle_follower_ * NodeOption:is_lifecycle_follower_ * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * change default * add NodeOption for costmap_2d_ros * add node options for costmap2dros as an independent node * code style reformat * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * changes * comment changes * change get_parameter into =false * comment modification * missing line * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * delete last line * change lifecycle_test fit to NodeOption --------- Co-authored-by: GoesM <GoesM@buaa.edu.cn> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
…avigation#4463) * bug fixed * add space * Update planner_server.cpp * add space for code style * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add ChildLifecycleNode mode in costmap_2d_ros * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower * fit to NodeOption: is_lifecycle_follower * fit reorder Werror * fix wrong use of is_lifecycle_follower * remove blank line * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * Add files via upload * NodeOption: is_lifecycle_follower_ * NodeOption:is_lifecycle_follower_ * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * change default * add NodeOption for costmap_2d_ros * add node options for costmap2dros as an independent node * code style reformat * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * changes * comment changes * change get_parameter into =false * comment modification * missing line * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * delete last line * change lifecycle_test fit to NodeOption --------- Co-authored-by: GoesM <GoesM@buaa.edu.cn> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
* replace throw-error with error-log to avoid UAF mentioned in ros-navigation#4175 (ros-navigation#4180) (ros-navigation#4305) * replace throw-error with error-log to avoid UAF * fix typo --------- Signed-off-by: GoesM <GoesM@buaa.edu.cn> Co-authored-by: GoesM <GoesM@buaa.edu.cn> * Cherry-pick from 15c9be0 (ros-navigation#4317) Convert all wall timers and wall rates to ROS clock respecting rates and timers (ros-navigation#4000) * Convert all wall timers and wall rates to ROS clock respecting rates and timers * linty mclint face * WPF wait plugin respect time * move duration metrics to use local clocks * bumping version for cache to break it * complete timing refactor * remove old variable * Add dynamic parameter (ros-navigation#4319) To fix ros-navigation#4315 Signed-off-by: Huy Nguyen Van <34271857+Huyhust13@users.noreply.github.com> * Humble release 11: May 23, 2024 (ros-navigation#4365) * Scale cost critic's weight when dynamically updated (ros-navigation#4246) * Scale cost critic's weight when dynamically updated Signed-off-by: pepisg <pedro.gonzalez@eia.edu.co> * sign off Signed-off-by: pepisg <pedro.gonzalez@eia.edu.co> --------- Signed-off-by: pepisg <pedro.gonzalez@eia.edu.co> * Add expanding the ~/ to the full home dir of user in the path to the map yaml. (ros-navigation#4258) * Add user home expander of home sequence Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Add passing home dir as string instead of const char* Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Add docs Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Fix function declaration Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Fix linter issues Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Uncrustify linter Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Uncrustify linter Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Uncrustify linter: remove remove whitespace Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> --------- Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> * Implement Critic for Velocity Deadband Hardware Constraints (ros-navigation#4256) * Adding new velocity deadband critic. - add some tests - cast double to float - add new features from "main" branch - fix formating - add cost test - fix linting issue - add README Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> * Remove velocity deadband critic from defaults Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> * remove old weight Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> * fix velocity deadband critic tests Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> --------- Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> * removing clearable layer param (unused) (ros-navigation#4280) * provide message validation check API (ros-navigation#4276) * provide validation_message.hpp Signed-off-by: goes <GoesM@buaa.edu.cn> * fix typo Signed-off-by: goes <GoesM@buaa.edu.cn> * add test_validation_messages.cpp Signed-off-by: goes <GoesM@buaa.edu.cn> * change include-order Signed-off-by: goes <GoesM@buaa.edu.cn> * reformat Signed-off-by: goes <GoesM@buaa.edu.cn> * update test Signed-off-by: goes <GoesM@buaa.edu.cn> --------- Signed-off-by: goes <GoesM@buaa.edu.cn> Co-authored-by: goes <GoesM@buaa.edu.cn> * Add footprint clearing for static layer (ros-navigation#4282) * Add footprint clearing for static layer Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com> * fix flckering --------- Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com> * Fix ros-navigation#4268 (ros-navigation#4296) Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * Update README.md of nav2_bt_navigator (ros-navigation#4309) Update link to docs Signed-off-by: João Britto <cbn.joao@gmail.com> * Fix undefined symbols in `libpf_lib.so` (ros-navigation#4312) When I build `nav2_amcl` with `-Wl,--no-undefined` I noticed `libpf_lib.so` has undefined symbols. This PR correctly links `libpf_lib.so` to `libm` so all symbols can be found. You can verify this by executing the following command: ``` ldd -r ./build/nav2_amcl/src/pf/libpf_lib.so linux-vdso.so.1 (0x00007ffd1f8c0000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000074e909a00000) /lib64/ld-linux-x86-64.so.2 (0x000074e909e60000) undefined symbol: ceil (./build/nav2_amcl/src/pf/libpf_lib.so) undefined symbol: atan2 (./build/nav2_amcl/src/pf/libpf_lib.so) undefined symbol: sin (./build/nav2_amcl/src/pf/libpf_lib.so) undefined symbol: hypot (./build/nav2_amcl/src/pf/libpf_lib.so) undefined symbol: cos (./build/nav2_amcl/src/pf/libpf_lib.so) undefined symbol: log (./build/nav2_amcl/src/pf/libpf_lib.so) undefined symbol: sqrt (./build/nav2_amcl/src/pf/libpf_lib.so) undefined symbol: floor (./build/nav2_amcl/src/pf/libpf_lib.so) ``` Signed-off-by: Ramon Wijnands <ramon.wijnands@nobleo.nl> * msg validation check for `/initialpose` in `nav2_amcl` (ros-navigation#4301) * add validation check for PoseWithCovarianceStamped Signed-off-by: goes <GoesM@buaa.edu.cn> * remove rebundant check before Signed-off-by: goes <GoesM@buaa.edu.cn> * reformat Signed-off-by: goes <GoesM@buaa.edu.cn> * typo fixed Signed-off-by: goes <GoesM@buaa.edu.cn> * change the type-name Signed-off-by: goes <GoesM@buaa.edu.cn> * update test Signed-off-by: goes <GoesM@buaa.edu.cn> * reformat Signed-off-by: goes <GoesM@buaa.edu.cn> * . Signed-off-by: goes <GoesM@buaa.edu.cn> * add comment Signed-off-by: goes <GoesM@buaa.edu.cn> * update comment Signed-off-by: goes <GoesM@buaa.edu.cn> * change header Signed-off-by: goes <GoesM@buaa.edu.cn> * update test Signed-off-by: goes <GoesM@buaa.edu.cn> * typo fixed Signed-off-by: goes <GoesM@buaa.edu.cn> --------- Signed-off-by: goes <GoesM@buaa.edu.cn> Co-authored-by: goes <GoesM@buaa.edu.cn> * 4320: Changed precision of calculations of the HybridNode MotionTable::getClosestAngularBin. (ros-navigation#4324) Signed-off-by: Krzysztof Pawełczyk <k.t.pawelczyk@gmail.com> Co-authored-by: Krzysztof Pawełczyk <kpawelczyk@autonomous-systems.pl> * [LifecycleNode] add bond_heartbeat_period (ros-navigation#4342) * add bond_heartbeat_period Signed-off-by: Guillaume Doisy <guillaume@dexory.com> * lint Signed-off-by: Guillaume Doisy <guillaume@dexory.com> --------- Signed-off-by: Guillaume Doisy <guillaume@dexory.com> Co-authored-by: Guillaume Doisy <guillaume@dexory.com> * Update path_longer_on_approach.cpp (ros-navigation#4344) Fix the bug that isPathUpdated function will return false for the reason that it compare the timestaped between new path and old path's last pose Signed-off-by: StetroF <120172218+StetroF@users.noreply.github.com> * [LifecycleManagerClient] clean set_initial_pose and navigate_to_pose (ros-navigation#4346) Signed-off-by: Guillaume Doisy <guillaume@dexory.com> Co-authored-by: Guillaume Doisy <guillaume@dexory.com> * Move projectState after getPointsInside (ros-navigation#4356) * Modify test to check fix Signed-off-by: Brice <brice.renaudeau@gmail.com> * Add static polygon check before simulation Signed-off-by: Brice <brice.renaudeau@gmail.com> --------- Signed-off-by: Brice <brice.renaudeau@gmail.com> * adding final pose in analytic expansion to check (ros-navigation#4353) * fix sync merge conflicts * bump humble to 1.1.15 for release * Revert "[LifecycleNode] add bond_heartbeat_period (ros-navigation#4342)" This reverts commit 6e44178. --------- Signed-off-by: pepisg <pedro.gonzalez@eia.edu.co> Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> Signed-off-by: goes <GoesM@buaa.edu.cn> Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: João Britto <cbn.joao@gmail.com> Signed-off-by: Ramon Wijnands <ramon.wijnands@nobleo.nl> Signed-off-by: Krzysztof Pawełczyk <k.t.pawelczyk@gmail.com> Signed-off-by: Guillaume Doisy <guillaume@dexory.com> Signed-off-by: StetroF <120172218+StetroF@users.noreply.github.com> Signed-off-by: Brice <brice.renaudeau@gmail.com> Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com> Co-authored-by: Wiktor Bajor <69388767+Wiktor-99@users.noreply.github.com> Co-authored-by: Sokolov Denis <52282102+perchess@users.noreply.github.com> Co-authored-by: GoesM <130988564+GoesM@users.noreply.github.com> Co-authored-by: goes <GoesM@buaa.edu.cn> Co-authored-by: Tony Najjar <tony.najjar.1997@gmail.com> Co-authored-by: João Britto <cbn.joao@gmail.com> Co-authored-by: Ramon Wijnands <ramon.wijnands@nobleo.nl> Co-authored-by: AzaelCicero <k.t.pawelczyk@gmail.com> Co-authored-by: Krzysztof Pawełczyk <kpawelczyk@autonomous-systems.pl> Co-authored-by: Guillaume Doisy <doisyg@users.noreply.github.com> Co-authored-by: Guillaume Doisy <guillaume@dexory.com> Co-authored-by: StetroF <120172218+StetroF@users.noreply.github.com> Co-authored-by: BriceRenaudeau <48433002+BriceRenaudeau@users.noreply.github.com> * adding mutex lock around map resizing due to dynamic parameter changes and associated processes (ros-navigation#4373) (ros-navigation#4378) (cherry picked from commit b0abc78) Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * Make BT nodes have configurable wait times (Backport ros-navigation#3960 ros-navigation#4178 ros-navigation#4203) (ros-navigation#4409) * WIP: Make BT nodes have configurable wait times. (ros-navigation#3960) * Make BT nodes have configurable wait times. Previous solution provided hardcoded 1s value. Right now the value can be configured for BT Action, Cancel and Service nodes. [ros-navigation#3920] Signed-off-by: Adam Galecki <embeddedadam@gmail.com> * Make BT nodes have configurable wait times. Previous solution provided hardcoded 1s value. Right now the value can be configured for BT Action, Cancel and Service nodes. [ros-navigation#3920] Signed-off-by: Adam Galecki <embeddedadam@gmail.com> * Fix typos, linting errors and value type from float to int * Fix extra underscores * Fix extra underscore * Update unit tests with blackboard parameter Signed-off-by: Adam Galecki <embeddedadam@gmail.com> * Fix formatting errors Signed-off-by: Adam Galecki <embeddedadam@gmail.com> * Update system tests to match new parameter Signed-off-by: Adam Galecki <embeddedadam@gmail.com> --------- Signed-off-by: Adam Galecki <embeddedadam@gmail.com> Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> * chore(nav2_behavior_tree): log actual wait period in bt_action_node (ros-navigation#4178) Signed-off-by: Felix <felix@fzeltner.de> Co-authored-by: Felix <felix@fzeltner.de> Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> * fix missing param declare (ros-navigation#4203) Signed-off-by: nelson <kaichie.lee@gmail.com> Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> * Fix error messages (ros-navigation#4411) Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> --------- Signed-off-by: Adam Galecki <embeddedadam@gmail.com> Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> Signed-off-by: Felix <felix@fzeltner.de> Signed-off-by: nelson <kaichie.lee@gmail.com> Co-authored-by: Adam Gałecki <73710544+embeddedadam@users.noreply.github.com> Co-authored-by: bi0ha2ard <bi0ha2ard@users.noreply.github.com> Co-authored-by: Felix <felix@fzeltner.de> Co-authored-by: nelson <kaichie.lee@gmail.com> * Enable reloading BT xml file with same name (ros-navigation#4209) (ros-navigation#4422) * Let BtActionServer overwrite xml * Make a ROS parameter for it * Rename flag to always reload BT xml file --------- Signed-off-by: Johannes Huemer <johannes.huemer@ait.ac.at> Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> Co-authored-by: Johannes Huemer <johannes.huemer@ait.ac.at> * fix bug mentioned in ros-navigation#3958 (ros-navigation#3972) (ros-navigation#4463) * bug fixed * add space * Update planner_server.cpp * add space for code style * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode to costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add childLifecycleNode mode in costmap_2d_ros * add ChildLifecycleNode mode in costmap_2d_ros * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * fit to NodeOption: is_lifecycle_follower * fit to NodeOption: is_lifecycle_follower * fit reorder Werror * fix wrong use of is_lifecycle_follower * remove blank line * NodeOption: is_lifecycle_follower_ * NodeOption: is_lifecycle_follower_ * Add files via upload * NodeOption: is_lifecycle_follower_ * NodeOption:is_lifecycle_follower_ * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * NodeOption:is_lifecycle_follower * change default * add NodeOption for costmap_2d_ros * add node options for costmap2dros as an independent node * code style reformat * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * fit to NodeOption of Costmap2DROS * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * changes * comment changes * change get_parameter into =false * comment modification * missing line * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp * delete last line * change lifecycle_test fit to NodeOption --------- Co-authored-by: GoesM <GoesM@buaa.edu.cn> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * bt_service_node and bt_action_node: Don't block BT loop (backport ros-navigation#4214) (ros-navigation#4408) (ros-navigation#4475) * bt_service_node and bt_action_node: Don't block BT loop (ros-navigation#4214) * Set smaller timeout for service node * Fix timeout calculation for service node * Add a feasible timeout also for action node --------- * Increasing test count from timeout handling changes (ros-navigation#4234) --------- Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * Behavior tree node for extracting pose from path (ros-navigation#4518) (ros-navigation#4525) * add get pose from path action Signed-off-by: MarcM0 <marc.morcos9@gmail.com> * cleanup from PR suggestions Signed-off-by: MarcM0 <marc.morcos9@gmail.com> * Updates for main compatibility Signed-off-by: MarcM0 <marc.morcos9@gmail.com> * Lint and build fix Signed-off-by: MarcM0 <marc.morcos9@gmail.com> * More Lint and warnings Signed-off-by: MarcM0 <marc.morcos9@gmail.com> * More Lint and build Signed-off-by: MarcM0 <marc.morcos9@gmail.com> * remove code left over from older file Signed-off-by: MarcM0 <marc.morcos9@gmail.com> * fix test blackboard var name Signed-off-by: MarcM0 <marc.morcos9@gmail.com> * only populate pose frame if empty Signed-off-by: MarcM0 <marc.morcos9@gmail.com> * lint Signed-off-by: MarcM0 <marc.morcos9@gmail.com> --------- Signed-off-by: MarcM0 <marc.morcos9@gmail.com> (cherry picked from commit 12a9c1d) Co-authored-by: Marc Morcos <30278842+MarcM0@users.noreply.github.com> * Make ros-navigation#4525 compile on humble (ros-navigation#4526) * Make it compile on humble Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> * Remove formatting Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> --------- Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> * Fix backward motion for graceful controller (ros-navigation#4527) (ros-navigation#4566) * Fix backward motion for graceful controller Signed-off-by: Alberto Tudela <ajtudela@gmail.com> * Update smooth_control_law.cpp Signed-off-by: Alberto Tudela <ajtudela@gmail.com> --------- Signed-off-by: Alberto Tudela <ajtudela@gmail.com> (cherry picked from commit d1ad640) Co-authored-by: Alberto Tudela <ajtudela@gmail.com> * nav2_collision_monitor dynamic parameters polygon and source enabled for Humble (ros-navigation#4615) * Copy modification from c2d84df into humble collision_monitor for dynamic parameter enabled in polygon * Add the enabled dynamic parameter for source. Signed-off-by: Enzo Ghisoni <enzo.ghisoni@hotmail.fr> * Start backport action_state_ declaration in collision_monitor_node_test.cpp Signed-off-by: EnzoGhisoni <enzo.ghisoni@botronics.be> --------- Signed-off-by: EnzoGhisoni <enzo.ghisoni@botronics.be> Co-authored-by: EnzoGhisoni <enzo.ghisoni@botronics.be> * Humble release 12: August 23 (ros-navigation#4644) * Add configure and cleanup transitions to lifecycle manager and client (ros-navigation#4371) Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi> * [RotationShimController] Rotate to goal heading (ros-navigation#4332) When arriving in the goal xy tolerance, the rotation shim controller takes back the control to command the robot to rotate in the goal heading orientation. The initial goal of the rotationShimController was to rotate the robot at the beginning of a navigation towards the paths orientation because some controllers are not good at performing in place rotations. For the same reason, the rotationShimController should be able to rotate the robot towards the goal heading. Signed-off-by: Antoine Gennart <gennart.antoine@gmail.com> * [RotationShimController] Fix test for rotate to goal heading (ros-navigation#4289) (ros-navigation#4391) * Fix rotate to goal heading tests Signed-off-by: Antoine Gennart <gennartan@disroot.org> * reset laser_scan_filter before reinit (ros-navigation#4397) Signed-off-by: goes <GoesM@buaa.edu.cn> Co-authored-by: goes <GoesM@buaa.edu.cn> * Warn if inflation_radius_ < inscribed_radius_ (ros-navigation#4423) * Warn if inflation_radius_ < inscribed_radius_ Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com> * convert to error Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com> --------- Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com> * chore: cleanup ros1 leftovers (ros-navigation#4446) Signed-off-by: Rein Appeldoorn <rein.appeldoorn@nobleo.nl> * precomputeDistanceHeuristic is now computed once (ros-navigation#4451) Signed-off-by: Vincent Belpois <vincent.belpois@gmail.com> Co-authored-by: SiddharthaUpase <s1dupase34@gmail.com> * shutdown services in destructor of `ClearCostmapService` (ros-navigation#4495) Signed-off-by: GoesM_server <GoesM@buaa.edu.cn> Co-authored-by: GoesM_server <GoesM@buaa.edu.cn> * fix(nav2_costmap_2d): make obstacle layer not current on enabled toggle (ros-navigation#4507) Signed-off-by: Kemal Bektas <kemal.bektas@node-robotics.com> Co-authored-by: Kemal Bektas <kemal.bektas@node-robotics.com> * min_turning_r_ getting param fix (ros-navigation#4510) * min_turning_r_ getting param fix Signed-off-by: Ivan Radionov <i.a.radionov@gmail.com.com> * Update nav2_mppi_controller/include/nav2_mppi_controller/motion_models.hpp Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: Ivan Radionov <i.a.radionov@gmail.com.com> --------- Signed-off-by: Ivan Radionov <i.a.radionov@gmail.com.com> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Co-authored-by: Ivan Radionov <i.a.radionov@gmail.com.com> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> * Return out of map update if frames mismatch. Signed-off-by Joey Yang (ros-navigation#4517) Signed-off-by: Joey Yang <joeyyang.ai@gmail.com> * check nullptr in smoothPlan() (ros-navigation#4544) * check nullptr in smoothPlan() Signed-off-by: GoesM <goesm@buaa.edu.cn> * code-style Signed-off-by: GoesM <goesm@buaa.edu.cn> * code-style Signed-off-by: GoesM <goesm@buaa.edu.cn> * simple change Signed-off-by: GoesM <goesm@buaa.edu.cn> --------- Signed-off-by: GoesM <goesm@buaa.edu.cn> Co-authored-by: GoesM <goesm@buaa.edu.cn> * bump to 1.1.15 Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * Revert "Add configure and cleanup transitions to lifecycle manager and client (ros-navigation#4371)" This reverts commit 06ec958. * fix merge conflict with humble sync * fix merge conflict with humble sync --------- Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi> Signed-off-by: Antoine Gennart <gennart.antoine@gmail.com> Signed-off-by: Antoine Gennart <gennartan@disroot.org> Signed-off-by: goes <GoesM@buaa.edu.cn> Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com> Signed-off-by: Rein Appeldoorn <rein.appeldoorn@nobleo.nl> Signed-off-by: Vincent Belpois <vincent.belpois@gmail.com> Signed-off-by: GoesM_server <GoesM@buaa.edu.cn> Signed-off-by: Kemal Bektas <kemal.bektas@node-robotics.com> Signed-off-by: Ivan Radionov <i.a.radionov@gmail.com.com> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: Joey Yang <joeyyang.ai@gmail.com> Signed-off-by: GoesM <goesm@buaa.edu.cn> Co-authored-by: Joni Pöllänen <jonipol@users.noreply.github.com> Co-authored-by: Saitama <gennartan@users.noreply.github.com> Co-authored-by: GoesM <130988564+GoesM@users.noreply.github.com> Co-authored-by: goes <GoesM@buaa.edu.cn> Co-authored-by: Tony Najjar <tony.najjar.1997@gmail.com> Co-authored-by: Rein Appeldoorn <reinzor@gmail.com> Co-authored-by: Vincent <46542431+VincidaB@users.noreply.github.com> Co-authored-by: SiddharthaUpase <s1dupase34@gmail.com> Co-authored-by: Kemal Bektas <34746077+bektaskemal@users.noreply.github.com> Co-authored-by: Kemal Bektas <kemal.bektas@node-robotics.com> Co-authored-by: Ivan Radionov <45877502+JJRedmond@users.noreply.github.com> Co-authored-by: Ivan Radionov <i.a.radionov@gmail.com.com> Co-authored-by: Joey Yang <joeyyang.ai@gmail.com> * Fixing ros-navigation#4661: MPPI ackermann reversing taking incorrect sign sometimes (ros-navigation#4664) (ros-navigation#4668) * Fixing ros-navigation#4661: MPPI ackermann reversing taking incorrect sign sometimes Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fixing unit test for type implicit cast Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> (cherry picked from commit 7eb47d8) Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> --------- Signed-off-by: GoesM <GoesM@buaa.edu.cn> Signed-off-by: Huy Nguyen Van <34271857+Huyhust13@users.noreply.github.com> Signed-off-by: pepisg <pedro.gonzalez@eia.edu.co> Signed-off-by: Wiktor Bajor <wiktorbajor1@gmail.com> Signed-off-by: Denis Sokolov <denis.sokolov48@gmail.com> Signed-off-by: goes <GoesM@buaa.edu.cn> Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: João Britto <cbn.joao@gmail.com> Signed-off-by: Ramon Wijnands <ramon.wijnands@nobleo.nl> Signed-off-by: Krzysztof Pawełczyk <k.t.pawelczyk@gmail.com> Signed-off-by: Guillaume Doisy <guillaume@dexory.com> Signed-off-by: StetroF <120172218+StetroF@users.noreply.github.com> Signed-off-by: Brice <brice.renaudeau@gmail.com> Signed-off-by: Adam Galecki <embeddedadam@gmail.com> Signed-off-by: Christoph Froehlich <christoph.froehlich@ait.ac.at> Signed-off-by: Felix <felix@fzeltner.de> Signed-off-by: nelson <kaichie.lee@gmail.com> Signed-off-by: Johannes Huemer <johannes.huemer@ait.ac.at> Signed-off-by: EnzoGhisoni <enzo.ghisoni@botronics.be> Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi> Signed-off-by: Antoine Gennart <gennart.antoine@gmail.com> Signed-off-by: Antoine Gennart <gennartan@disroot.org> Signed-off-by: Rein Appeldoorn <rein.appeldoorn@nobleo.nl> Signed-off-by: Vincent Belpois <vincent.belpois@gmail.com> Signed-off-by: GoesM_server <GoesM@buaa.edu.cn> Signed-off-by: Kemal Bektas <kemal.bektas@node-robotics.com> Signed-off-by: Ivan Radionov <i.a.radionov@gmail.com.com> Signed-off-by: Joey Yang <joeyyang.ai@gmail.com> Signed-off-by: GoesM <goesm@buaa.edu.cn> Co-authored-by: GoesM <130988564+GoesM@users.noreply.github.com> Co-authored-by: GoesM <GoesM@buaa.edu.cn> Co-authored-by: Benjamin-Tan <tan.benjaminkx@gmail.com> Co-authored-by: Huy Nguyen Van <34271857+Huyhust13@users.noreply.github.com> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com> Co-authored-by: Wiktor Bajor <69388767+Wiktor-99@users.noreply.github.com> Co-authored-by: Sokolov Denis <52282102+perchess@users.noreply.github.com> Co-authored-by: Tony Najjar <tony.najjar.1997@gmail.com> Co-authored-by: João Britto <cbn.joao@gmail.com> Co-authored-by: Ramon Wijnands <ramon.wijnands@nobleo.nl> Co-authored-by: AzaelCicero <k.t.pawelczyk@gmail.com> Co-authored-by: Krzysztof Pawełczyk <kpawelczyk@autonomous-systems.pl> Co-authored-by: Guillaume Doisy <doisyg@users.noreply.github.com> Co-authored-by: Guillaume Doisy <guillaume@dexory.com> Co-authored-by: StetroF <120172218+StetroF@users.noreply.github.com> Co-authored-by: BriceRenaudeau <48433002+BriceRenaudeau@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com> Co-authored-by: Adam Gałecki <73710544+embeddedadam@users.noreply.github.com> Co-authored-by: bi0ha2ard <bi0ha2ard@users.noreply.github.com> Co-authored-by: Felix <felix@fzeltner.de> Co-authored-by: nelson <kaichie.lee@gmail.com> Co-authored-by: Johannes Huemer <johannes.huemer@ait.ac.at> Co-authored-by: Marc Morcos <30278842+MarcM0@users.noreply.github.com> Co-authored-by: Alberto Tudela <ajtudela@gmail.com> Co-authored-by: Enzo Ghisoni <33607172+EnzoGhisoni@users.noreply.github.com> Co-authored-by: EnzoGhisoni <enzo.ghisoni@botronics.be> Co-authored-by: Joni Pöllänen <jonipol@users.noreply.github.com> Co-authored-by: Saitama <gennartan@users.noreply.github.com> Co-authored-by: Rein Appeldoorn <reinzor@gmail.com> Co-authored-by: Vincent <46542431+VincidaB@users.noreply.github.com> Co-authored-by: SiddharthaUpase <s1dupase34@gmail.com> Co-authored-by: Kemal Bektas <34746077+bektaskemal@users.noreply.github.com> Co-authored-by: Kemal Bektas <kemal.bektas@node-robotics.com> Co-authored-by: Ivan Radionov <45877502+JJRedmond@users.noreply.github.com> Co-authored-by: Ivan Radionov <i.a.radionov@gmail.com.com> Co-authored-by: Joey Yang <joeyyang.ai@gmail.com>
Basic Info
Description of contribution in a few bullet points
following ISSUE #3940 :
BUG Description
When in complex scenarios (like within frequent movement of obstacles),
significant changes in the external environment fed back by sensors messages will lead to a reset of the costmap , which free pointers of
plugin
andfilter
;At the same time, it happened that goal action server access
plugin
andfilter
pointers inisCurrent()
, resulting in a crash of the program.Solution
The only place where
plugin
andfilter
pointers could be freed:in file
nav2_costmap_2d/src/clear_costmap_service.cpp
, in function as following:costmap_.resetLayers()
could freeplugin
andfilter
pointershere's already a
std::unique_lock<>
, to avoid some other functions running whileresetLayers()
function runningbut not to avoid
layered_costmap_->isCurrent()
whileresetLayers()
so, in file
nav2_costmap_2d/include/costmap_2d_ros.hpp
, we insert the same lock in function as following:Description of documentation updates required from your changes
Future work that may be required in bullet points
For Maintainers: