-
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 <yuanborong@hotmail.com> Signed-off-by: Borong Yuan <yuanborong@hotmail.com> * 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 <17ofh@queensu.ca> * updated copyright in modified file Signed-off-by: Owen Hooper <17ofh@queensu.ca> Signed-off-by: Owen Hooper <17ofh@queensu.ca> * 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 <yuanborong@hotmail.com> Signed-off-by: Owen Hooper <17ofh@queensu.ca> Co-authored-by: Adam Aposhian <aposhian.dev@gmail.com> Co-authored-by: Erwin Lejeune <erwin.lejeune15@gmail.com> Co-authored-by: Sven Langner <svenlr@users.noreply.github.com> Co-authored-by: Borong Yuan <yuanborong@hotmail.com> Co-authored-by: Alexey Merzlyakov <60094858+AlexeyMerzlyakov@users.noreply.github.com> Co-authored-by: MartiBolet <43337758+MartiBolet@users.noreply.github.com> Co-authored-by: Owen Hooper <17ofh@queensu.ca> Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com>
* 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 <yuanborong@hotmail.com> Signed-off-by: Borong Yuan <yuanborong@hotmail.com> * 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 <17ofh@queensu.ca> * updated copyright in modified file Signed-off-by: Owen Hooper <17ofh@queensu.ca> Signed-off-by: Owen Hooper <17ofh@queensu.ca> * 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 <yuanborong@hotmail.com> Signed-off-by: Owen Hooper <17ofh@queensu.ca> Co-authored-by: Adam Aposhian <aposhian.dev@gmail.com> Co-authored-by: Erwin Lejeune <erwin.lejeune15@gmail.com> Co-authored-by: Sven Langner <svenlr@users.noreply.github.com> Co-authored-by: Borong Yuan <yuanborong@hotmail.com> Co-authored-by: Alexey Merzlyakov <60094858+AlexeyMerzlyakov@users.noreply.github.com> Co-authored-by: MartiBolet <43337758+MartiBolet@users.noreply.github.com> Co-authored-by: Owen Hooper <17ofh@queensu.ca> Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com>
* 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 <yuanborong@hotmail.com> Signed-off-by: Borong Yuan <yuanborong@hotmail.com> * 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 <17ofh@queensu.ca> * updated copyright in modified file Signed-off-by: Owen Hooper <17ofh@queensu.ca> Signed-off-by: Owen Hooper <17ofh@queensu.ca> * 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 <yuanborong@hotmail.com> Signed-off-by: Owen Hooper <17ofh@queensu.ca> Co-authored-by: Adam Aposhian <aposhian.dev@gmail.com> Co-authored-by: Erwin Lejeune <erwin.lejeune15@gmail.com> Co-authored-by: Sven Langner <svenlr@users.noreply.github.com> Co-authored-by: Borong Yuan <yuanborong@hotmail.com> Co-authored-by: Alexey Merzlyakov <60094858+AlexeyMerzlyakov@users.noreply.github.com> Co-authored-by: MartiBolet <43337758+MartiBolet@users.noreply.github.com> Co-authored-by: Owen Hooper <17ofh@queensu.ca> Co-authored-by: Pedro Alejandro González <71234974+pepisg@users.noreply.github.com>
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: