-
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
Ensure that plugin initialization to be called before updating routines #3307
Ensure that plugin initialization to be called before updating routines #3307
Conversation
@AlexeyMerzlyakov, please properly fill in PR template in the future. @SteveMacenski, use this instead.
|
costmap_publisher_->publishCostmap(); | ||
last_publish_ = current_time; | ||
// Execute after start() will complete plugins activation | ||
if (!stopped_) { |
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.
In a good way, this change should be checked through std::atomic<bool>
, as well as other parallel accessed variables, such as initialized_
(https://github.com/ros-planning/navigation2/blob/main/nav2_costmap_2d/src/costmap_2d_ros.cpp#L494 and https://github.com/ros-planning/navigation2/blob/main/nav2_costmap_2d/src/costmap_2d_ros.cpp#L527). This is rather a subject of separate ticket, I think.
* remove exec_depend on behaviortree_cpp_v3 (#3279) * BT Service Node to throw if service was not available in time (#3256) * throw if service server wasn't available in time mimic the behavior of the bt action node constructor * throw if action unavailable in bt cancel action * use chrono literals namespace * fix linting errors * fix code style divergence * Remove duplicate of nav2_back_up_cancel_bt_node (#3332) * Remove unused velocity scaling config from example xml (#3330) Signed-off-by: Borong Yuan <[email protected]> Signed-off-by: Borong Yuan <[email protected]> * Make mapUpdateLoop() indicator variables to be thread-safe (#3308) * Ensure that plugin initialization to be called before updating routines (#3307) * Solve bug when CostmapInfoServer is reactivated (#3292) * Solve bug when CostmapInfoServer is reactivated * Implemented smoother selector bt node (#3283) * Implemented smoother selector bt node Signed-off-by: Owen Hooper <[email protected]> * updated copyright in modified file Signed-off-by: Owen Hooper <[email protected]> Signed-off-by: Owen Hooper <[email protected]> * Add allow_unknown parameter to theta star planner (#3286) * Add allow unknown parameter to theta star planner * Add allow unknown parameter to tests * missing comma * Change cost of unknown tiles * Uncrustify * bump to 1.1.3 for humble sync 3 Signed-off-by: Borong Yuan <[email protected]> Signed-off-by: Owen Hooper <[email protected]> Co-authored-by: Adam Aposhian <[email protected]> Co-authored-by: Erwin Lejeune <[email protected]> Co-authored-by: Sven Langner <[email protected]> Co-authored-by: Borong Yuan <[email protected]> Co-authored-by: Alexey Merzlyakov <[email protected]> Co-authored-by: MartiBolet <[email protected]> Co-authored-by: Owen Hooper <[email protected]> Co-authored-by: Pedro Alejandro González <[email protected]>
* remove exec_depend on behaviortree_cpp_v3 (ros-navigation#3279) * BT Service Node to throw if service was not available in time (ros-navigation#3256) * throw if service server wasn't available in time mimic the behavior of the bt action node constructor * throw if action unavailable in bt cancel action * use chrono literals namespace * fix linting errors * fix code style divergence * Remove duplicate of nav2_back_up_cancel_bt_node (ros-navigation#3332) * Remove unused velocity scaling config from example xml (ros-navigation#3330) Signed-off-by: Borong Yuan <[email protected]> Signed-off-by: Borong Yuan <[email protected]> * Make mapUpdateLoop() indicator variables to be thread-safe (ros-navigation#3308) * Ensure that plugin initialization to be called before updating routines (ros-navigation#3307) * Solve bug when CostmapInfoServer is reactivated (ros-navigation#3292) * Solve bug when CostmapInfoServer is reactivated * Implemented smoother selector bt node (ros-navigation#3283) * Implemented smoother selector bt node Signed-off-by: Owen Hooper <[email protected]> * updated copyright in modified file Signed-off-by: Owen Hooper <[email protected]> Signed-off-by: Owen Hooper <[email protected]> * Add allow_unknown parameter to theta star planner (ros-navigation#3286) * Add allow unknown parameter to theta star planner * Add allow unknown parameter to tests * missing comma * Change cost of unknown tiles * Uncrustify * bump to 1.1.3 for humble sync 3 Signed-off-by: Borong Yuan <[email protected]> Signed-off-by: Owen Hooper <[email protected]> Co-authored-by: Adam Aposhian <[email protected]> Co-authored-by: Erwin Lejeune <[email protected]> Co-authored-by: Sven Langner <[email protected]> Co-authored-by: Borong Yuan <[email protected]> Co-authored-by: Alexey Merzlyakov <[email protected]> Co-authored-by: MartiBolet <[email protected]> Co-authored-by: Owen Hooper <[email protected]> Co-authored-by: Pedro Alejandro González <[email protected]>
* remove exec_depend on behaviortree_cpp_v3 (ros-navigation#3279) * BT Service Node to throw if service was not available in time (ros-navigation#3256) * throw if service server wasn't available in time mimic the behavior of the bt action node constructor * throw if action unavailable in bt cancel action * use chrono literals namespace * fix linting errors * fix code style divergence * Remove duplicate of nav2_back_up_cancel_bt_node (ros-navigation#3332) * Remove unused velocity scaling config from example xml (ros-navigation#3330) Signed-off-by: Borong Yuan <[email protected]> Signed-off-by: Borong Yuan <[email protected]> * Make mapUpdateLoop() indicator variables to be thread-safe (ros-navigation#3308) * Ensure that plugin initialization to be called before updating routines (ros-navigation#3307) * Solve bug when CostmapInfoServer is reactivated (ros-navigation#3292) * Solve bug when CostmapInfoServer is reactivated * Implemented smoother selector bt node (ros-navigation#3283) * Implemented smoother selector bt node Signed-off-by: Owen Hooper <[email protected]> * updated copyright in modified file Signed-off-by: Owen Hooper <[email protected]> Signed-off-by: Owen Hooper <[email protected]> * Add allow_unknown parameter to theta star planner (ros-navigation#3286) * Add allow unknown parameter to theta star planner * Add allow unknown parameter to tests * missing comma * Change cost of unknown tiles * Uncrustify * bump to 1.1.3 for humble sync 3 Signed-off-by: Borong Yuan <[email protected]> Signed-off-by: Owen Hooper <[email protected]> Co-authored-by: Adam Aposhian <[email protected]> Co-authored-by: Erwin Lejeune <[email protected]> Co-authored-by: Sven Langner <[email protected]> Co-authored-by: Borong Yuan <[email protected]> Co-authored-by: Alexey Merzlyakov <[email protected]> Co-authored-by: MartiBolet <[email protected]> Co-authored-by: Owen Hooper <[email protected]> Co-authored-by: Pedro Alejandro González <[email protected]>
Fixes the situations when Costmap2D plugin is being processed before initialization
Basic Info
nav2_costmap_2d
andnav2_system_tests
: no regressionsDescription of contribution in a few bullet points
Costmap2DROS::updateMap()
is being processed in the main update loop only ifstopped_
isfalse
.OrderLayer
costmap plugin that sleeps in theactivate()
stage checking that parallel thread won't callupdateCosts()
/updateBound()
routines before activation will be finished. The testcase createsCostmap2DROS
object with this plugin enabled and then calls it though the mainCostmap2DROS
callback API. If plugin API call sequence is wrong,OrderLayer
will throw an exception that will cause testcase to fail. If API call sequence is OK, testcase will be finished normally.Description of documentation updates required from your changes
Future work that may be required in bullet points
For Maintainers: