-
Notifications
You must be signed in to change notification settings - Fork 1.7k
nav2_costmap_2d plugin container layer #4781
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 plugin container layer #4781
Conversation
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
…ruction, changed addPlugin to take layer name as an argument Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
…unecessary members Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Codecov ReportAttention: Patch coverage is
|
nav2_costmap_2d/include/nav2_costmap_2d/plugin_container_layer.hpp
Outdated
Show resolved
Hide resolved
nav2_costmap_2d/include/nav2_costmap_2d/plugin_container_layer.hpp
Outdated
Show resolved
Hide resolved
nav2_costmap_2d/include/nav2_costmap_2d/plugin_container_layer.hpp
Outdated
Show resolved
Hide resolved
SteveMacenski
left a comment
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 didn't call out everything, since I think much of other comments are moot if the costmap_ disappears so its better to wait for the revised version :-)
Check out the codecov annotations in the Code UX of the PR to see some gaps in your testing. Luckily, you have examples of alot of other Nav2 code of how to fill them (most are pretty easy pickings)
nav2_costmap_2d/include/nav2_costmap_2d/plugin_container_layer.hpp
Outdated
Show resolved
Hide resolved
nav2_costmap_2d/include/nav2_costmap_2d/plugin_container_layer.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
…nknownOverwrite case Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
…test coverage Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
5ee05cf to
b25f2a3
Compare
Latest version should have code coverage up to 99%' |
SteveMacenski
left a comment
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.
Ah man, see how much more clean / concise this is now!
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
nav2_costmap_2d/include/nav2_costmap_2d/plugin_container_layer.hpp
Outdated
Show resolved
Hide resolved
|
Also, your tests are failing 🙃 |
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
51798af to
64f0b51
Compare
SteveMacenski
left a comment
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.
Then pretty much done!
On the docs, I still need the updated image for multiple inflation settings (or another example) to show how it can be used to create differing behavior -- but otherwise that is good too!
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
Signed-off-by: alexander <[email protected]>
|
Thanks! All good and merged the pair! |
* updated CMakeLists.txt to include plugin_container_layer Signed-off-by: alexander <[email protected]> * added plugin container layer to costmap_plugins.xml Signed-off-by: alexander <[email protected]> * initial commit of plugin container layer Signed-off-by: alexander <[email protected]> * fixed plugin namespace Signed-off-by: alexander <[email protected]> * fixed message_filter Signed-off-by: alexander <[email protected]> * linting Signed-off-by: alexander <[email protected]> * modified addPlugin method to also take layer name Signed-off-by: alexander <[email protected]> * reverted default plugins to be empty, free costmap_ during layer destruction, changed addPlugin to take layer name as an argument Signed-off-by: alexander <[email protected]> * CMake changes to test plugin container layer Signed-off-by: alexander <[email protected]> * added helper method to add plugin container layer Signed-off-by: alexander <[email protected]> * added initial implementation of plugin container tests Signed-off-by: alexander <[email protected]> * added enable to dynamic params, removed unecessary comments, removed unecessary members Signed-off-by: alexander <[email protected]> * cleaned up and added additional tests Signed-off-by: alexander <[email protected]> * added Apache copyrights Signed-off-by: alexander <[email protected]> * linting for ament_cpplint Signed-off-by: alexander <[email protected]> * added example file for plugin_container_layer to nav2_bringup Signed-off-by: alexander <[email protected]> * removed unused rolling_window_ member variable Signed-off-by: alexander <[email protected]> * removed default plugins and plugin types Signed-off-by: alexander <[email protected]> * switched to using CombinationMethod enum, added updateWithMaxWithoutUnknownOverwrite case Signed-off-by: alexander <[email protected]> * removed combined_costmap_ Signed-off-by: alexander <[email protected]> * fixed layer naming and accomodating tests Signed-off-by: alexander <[email protected]> * removed nav2_params_plugin_container_layer.yaml Signed-off-by: alexander <[email protected]> * added more comprehensive checks for checking if layers are clearable Signed-off-by: alexander <[email protected]> * added dynamics parameter handling, fixed current_ setting, increased test coverage Signed-off-by: alexander <[email protected]> * removed unnecessary locks, added default value Signed-off-by: alexander <[email protected]> * removed unecessary resetMap Signed-off-by: alexander <[email protected]> * added layer resetting when reset method is called Signed-off-by: alexander <[email protected]> * swapped logic for isClearable Signed-off-by: alexander <[email protected]> * fixed breaking tests, removed unnecessary combined_costmap_ Signed-off-by: alexander <[email protected]> * consolidated initialization for loops Signed-off-by: alexander <[email protected]> * switched default_value_ to NO_INFORMATION Signed-off-by: alexander <[email protected]> * added clearArea function Signed-off-by: alexander <[email protected]> * added clearArea test Signed-off-by: alexander <[email protected]> * removed TODO message Signed-off-by: alexander <[email protected]> * removed constructor and destructors since they do nothing Signed-off-by: alexander <[email protected]> * added check on costmap layer to see if it is clearable first Signed-off-by: alexander <[email protected]> * fixed tests for clearing functionality Signed-off-by: alexander <[email protected]> * added try catch around initialization of plugins Signed-off-by: alexander <[email protected]> * fixed indents Signed-off-by: alexander <[email protected]> --------- Signed-off-by: alexander <[email protected]>
* Pass IDLE to on_tick, use that for initialize condition (#4744) * Pass IDLE to on_tick, use that for initialize condition Signed-off-by: redvinaa <[email protected]> * Fix battery sub creation bug Signed-off-by: redvinaa <[email protected]> --------- Signed-off-by: redvinaa <[email protected]> * nav2_costmap_2d: add missing default_value_ copy in Costmap2D operator= (#4753) default_value_ is an attribute of the Costmap2D class and should be copied along with the other attributes. Signed-off-by: Dylan De Coeyer <[email protected]> * nav2_costmap_2d plugin container layer (#4781) * updated CMakeLists.txt to include plugin_container_layer Signed-off-by: alexander <[email protected]> * added plugin container layer to costmap_plugins.xml Signed-off-by: alexander <[email protected]> * initial commit of plugin container layer Signed-off-by: alexander <[email protected]> * fixed plugin namespace Signed-off-by: alexander <[email protected]> * fixed message_filter Signed-off-by: alexander <[email protected]> * linting Signed-off-by: alexander <[email protected]> * modified addPlugin method to also take layer name Signed-off-by: alexander <[email protected]> * reverted default plugins to be empty, free costmap_ during layer destruction, changed addPlugin to take layer name as an argument Signed-off-by: alexander <[email protected]> * CMake changes to test plugin container layer Signed-off-by: alexander <[email protected]> * added helper method to add plugin container layer Signed-off-by: alexander <[email protected]> * added initial implementation of plugin container tests Signed-off-by: alexander <[email protected]> * added enable to dynamic params, removed unecessary comments, removed unecessary members Signed-off-by: alexander <[email protected]> * cleaned up and added additional tests Signed-off-by: alexander <[email protected]> * added Apache copyrights Signed-off-by: alexander <[email protected]> * linting for ament_cpplint Signed-off-by: alexander <[email protected]> * added example file for plugin_container_layer to nav2_bringup Signed-off-by: alexander <[email protected]> * removed unused rolling_window_ member variable Signed-off-by: alexander <[email protected]> * removed default plugins and plugin types Signed-off-by: alexander <[email protected]> * switched to using CombinationMethod enum, added updateWithMaxWithoutUnknownOverwrite case Signed-off-by: alexander <[email protected]> * removed combined_costmap_ Signed-off-by: alexander <[email protected]> * fixed layer naming and accomodating tests Signed-off-by: alexander <[email protected]> * removed nav2_params_plugin_container_layer.yaml Signed-off-by: alexander <[email protected]> * added more comprehensive checks for checking if layers are clearable Signed-off-by: alexander <[email protected]> * added dynamics parameter handling, fixed current_ setting, increased test coverage Signed-off-by: alexander <[email protected]> * removed unnecessary locks, added default value Signed-off-by: alexander <[email protected]> * removed unecessary resetMap Signed-off-by: alexander <[email protected]> * added layer resetting when reset method is called Signed-off-by: alexander <[email protected]> * swapped logic for isClearable Signed-off-by: alexander <[email protected]> * fixed breaking tests, removed unnecessary combined_costmap_ Signed-off-by: alexander <[email protected]> * consolidated initialization for loops Signed-off-by: alexander <[email protected]> * switched default_value_ to NO_INFORMATION Signed-off-by: alexander <[email protected]> * added clearArea function Signed-off-by: alexander <[email protected]> * added clearArea test Signed-off-by: alexander <[email protected]> * removed TODO message Signed-off-by: alexander <[email protected]> * removed constructor and destructors since they do nothing Signed-off-by: alexander <[email protected]> * added check on costmap layer to see if it is clearable first Signed-off-by: alexander <[email protected]> * fixed tests for clearing functionality Signed-off-by: alexander <[email protected]> * added try catch around initialization of plugins Signed-off-by: alexander <[email protected]> * fixed indents Signed-off-by: alexander <[email protected]> --------- Signed-off-by: alexander <[email protected]> * bumping to 1.3.3 for jazzy sync Signed-off-by: Steve Macenski <[email protected]> * Fix backporting error: renamed header files Signed-off-by: Steve Macenski <[email protected]> --------- Signed-off-by: redvinaa <[email protected]> Signed-off-by: Dylan De Coeyer <[email protected]> Signed-off-by: alexander <[email protected]> Signed-off-by: Steve Macenski <[email protected]> Co-authored-by: Vince Reda <[email protected]> Co-authored-by: DylanDeCoeyer-Quimesis <[email protected]> Co-authored-by: alexanderjyuen <[email protected]>
* updated CMakeLists.txt to include plugin_container_layer Signed-off-by: alexander <[email protected]> * added plugin container layer to costmap_plugins.xml Signed-off-by: alexander <[email protected]> * initial commit of plugin container layer Signed-off-by: alexander <[email protected]> * fixed plugin namespace Signed-off-by: alexander <[email protected]> * fixed message_filter Signed-off-by: alexander <[email protected]> * linting Signed-off-by: alexander <[email protected]> * modified addPlugin method to also take layer name Signed-off-by: alexander <[email protected]> * reverted default plugins to be empty, free costmap_ during layer destruction, changed addPlugin to take layer name as an argument Signed-off-by: alexander <[email protected]> * CMake changes to test plugin container layer Signed-off-by: alexander <[email protected]> * added helper method to add plugin container layer Signed-off-by: alexander <[email protected]> * added initial implementation of plugin container tests Signed-off-by: alexander <[email protected]> * added enable to dynamic params, removed unecessary comments, removed unecessary members Signed-off-by: alexander <[email protected]> * cleaned up and added additional tests Signed-off-by: alexander <[email protected]> * added Apache copyrights Signed-off-by: alexander <[email protected]> * linting for ament_cpplint Signed-off-by: alexander <[email protected]> * added example file for plugin_container_layer to nav2_bringup Signed-off-by: alexander <[email protected]> * removed unused rolling_window_ member variable Signed-off-by: alexander <[email protected]> * removed default plugins and plugin types Signed-off-by: alexander <[email protected]> * switched to using CombinationMethod enum, added updateWithMaxWithoutUnknownOverwrite case Signed-off-by: alexander <[email protected]> * removed combined_costmap_ Signed-off-by: alexander <[email protected]> * fixed layer naming and accomodating tests Signed-off-by: alexander <[email protected]> * removed nav2_params_plugin_container_layer.yaml Signed-off-by: alexander <[email protected]> * added more comprehensive checks for checking if layers are clearable Signed-off-by: alexander <[email protected]> * added dynamics parameter handling, fixed current_ setting, increased test coverage Signed-off-by: alexander <[email protected]> * removed unnecessary locks, added default value Signed-off-by: alexander <[email protected]> * removed unecessary resetMap Signed-off-by: alexander <[email protected]> * added layer resetting when reset method is called Signed-off-by: alexander <[email protected]> * swapped logic for isClearable Signed-off-by: alexander <[email protected]> * fixed breaking tests, removed unnecessary combined_costmap_ Signed-off-by: alexander <[email protected]> * consolidated initialization for loops Signed-off-by: alexander <[email protected]> * switched default_value_ to NO_INFORMATION Signed-off-by: alexander <[email protected]> * added clearArea function Signed-off-by: alexander <[email protected]> * added clearArea test Signed-off-by: alexander <[email protected]> * removed TODO message Signed-off-by: alexander <[email protected]> * removed constructor and destructors since they do nothing Signed-off-by: alexander <[email protected]> * added check on costmap layer to see if it is clearable first Signed-off-by: alexander <[email protected]> * fixed tests for clearing functionality Signed-off-by: alexander <[email protected]> * added try catch around initialization of plugins Signed-off-by: alexander <[email protected]> * fixed indents Signed-off-by: alexander <[email protected]> --------- Signed-off-by: alexander <[email protected]>
* updated CMakeLists.txt to include plugin_container_layer Signed-off-by: alexander <[email protected]> * added plugin container layer to costmap_plugins.xml Signed-off-by: alexander <[email protected]> * initial commit of plugin container layer Signed-off-by: alexander <[email protected]> * fixed plugin namespace Signed-off-by: alexander <[email protected]> * fixed message_filter Signed-off-by: alexander <[email protected]> * linting Signed-off-by: alexander <[email protected]> * modified addPlugin method to also take layer name Signed-off-by: alexander <[email protected]> * reverted default plugins to be empty, free costmap_ during layer destruction, changed addPlugin to take layer name as an argument Signed-off-by: alexander <[email protected]> * CMake changes to test plugin container layer Signed-off-by: alexander <[email protected]> * added helper method to add plugin container layer Signed-off-by: alexander <[email protected]> * added initial implementation of plugin container tests Signed-off-by: alexander <[email protected]> * added enable to dynamic params, removed unecessary comments, removed unecessary members Signed-off-by: alexander <[email protected]> * cleaned up and added additional tests Signed-off-by: alexander <[email protected]> * added Apache copyrights Signed-off-by: alexander <[email protected]> * linting for ament_cpplint Signed-off-by: alexander <[email protected]> * added example file for plugin_container_layer to nav2_bringup Signed-off-by: alexander <[email protected]> * removed unused rolling_window_ member variable Signed-off-by: alexander <[email protected]> * removed default plugins and plugin types Signed-off-by: alexander <[email protected]> * switched to using CombinationMethod enum, added updateWithMaxWithoutUnknownOverwrite case Signed-off-by: alexander <[email protected]> * removed combined_costmap_ Signed-off-by: alexander <[email protected]> * fixed layer naming and accomodating tests Signed-off-by: alexander <[email protected]> * removed nav2_params_plugin_container_layer.yaml Signed-off-by: alexander <[email protected]> * added more comprehensive checks for checking if layers are clearable Signed-off-by: alexander <[email protected]> * added dynamics parameter handling, fixed current_ setting, increased test coverage Signed-off-by: alexander <[email protected]> * removed unnecessary locks, added default value Signed-off-by: alexander <[email protected]> * removed unecessary resetMap Signed-off-by: alexander <[email protected]> * added layer resetting when reset method is called Signed-off-by: alexander <[email protected]> * swapped logic for isClearable Signed-off-by: alexander <[email protected]> * fixed breaking tests, removed unnecessary combined_costmap_ Signed-off-by: alexander <[email protected]> * consolidated initialization for loops Signed-off-by: alexander <[email protected]> * switched default_value_ to NO_INFORMATION Signed-off-by: alexander <[email protected]> * added clearArea function Signed-off-by: alexander <[email protected]> * added clearArea test Signed-off-by: alexander <[email protected]> * removed TODO message Signed-off-by: alexander <[email protected]> * removed constructor and destructors since they do nothing Signed-off-by: alexander <[email protected]> * added check on costmap layer to see if it is clearable first Signed-off-by: alexander <[email protected]> * fixed tests for clearing functionality Signed-off-by: alexander <[email protected]> * added try catch around initialization of plugins Signed-off-by: alexander <[email protected]> * fixed indents Signed-off-by: alexander <[email protected]> --------- Signed-off-by: alexander <[email protected]> Signed-off-by: stevedanomodolor <[email protected]>
Basic Info
Description of contribution in a few bullet points
Added a new costmap layer plugin to nav2_costmap_2d called plugin container layer which allows users to specify different submaps within a costmap. For example if one would like to apply a certain set of inflation layer settings to the static layer, and a different set of inflation layer settings to an obstacle layer, in the same overall costmap, one could group those different layers under different plugin container layers
Modified nav2_costmap_2d integrated testing to also run tests for the plugin container layer
included nav2_params_plugin_container_layer.yaml to run turtlebot example
Description of documentation updates required from your changes
Future work that may be required in bullet points
For Maintainers: