refactor: change style of plugin names#5793
refactor: change style of plugin names#5793AJedancov wants to merge 9 commits intoros-navigation:mainfrom
Conversation
|
I will try to implement the changes described above to complete the task. Since the current changes affect the entire project, I think it would be easier for the review to separate them as new PR referencing this one to keep everything a little cleaner. What do you think? |
|
Please rebase / pull in main to fix CI. We've updated some cache keys and rebalanced our pipeline recently |
SteveMacenski
left a comment
There was a problem hiding this comment.
We need the corresponding docs PR, but nothing here I object to. @mini-1235 can you look at this and make sure we didn't miss any default setting update in the code, BT XML default IDs to be updated
|
On your open items: maybe we should invert these to be all snake_case then if we're having behavior tied this way. I don't like the idea of having topic names changed, especially to use CamelCase since that's an antipattern for topic naming. We could force snake_case the plugin names for topic naming, but that seems like trying to make it harder for ourselves. |
e9be492 to
a287086
Compare
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 7 files with indirect coverage changes 🚀 New features to boost your workflow:
|
I agree with you and tried to avoid this during the change process. Currently, I see several ways how this can be achieved further:
As an example, I have seen how this has already been implemented in navigation2/nav2_core/include/nav2_core/behavior_tree_navigator.hpp Lines 211 to 214 in 4d9314d There is used a virtual method: And each plugin override it according to its name: This way we can decouple the names from the configuration files and the names used for topics, action or services.
/route_server/DynamicEdgesScorer/adjust_edges
/route_server/ReroutingService/reroute
...
/fromLLAnd I could fix them at the same time. |
I think this is the right direction to go! :-) |
a287086 to
99a95ef
Compare
|
I have prepared the new changes as discussed above, which include:
As before, the new changes were tested locally using The only thing I want to note is that the names for navigation2/nav2_mppi_controller/src/critic_manager.cpp Lines 60 to 61 in e461d7f I also have a couple points to discuss. I know this doesn't apply to plugins, but the following names stand out too:
Would you also consider replacing them? |
|
This pull request is in conflict. Could you fix it @AJedancov? |
There was a problem hiding this comment.
The biggest thing here is going to be the Migration guide to explain to people where and how to make the changes. Please detail all of the snake_case changed values explicitly in a bulleted list and link back to this PR as an example with the migrated yaml file.
This is a large, breaking change, so any detail you think is important to help someone go from A->B would be great.
Also, we need to update to snake_case in the docs / tutorials / configuration guides as well
There's a few merge conflicts now that should be addressed
Overall, very good! 😄
nav2_docking/opennav_docking/test/dock_files/test_dock_bad_conversion_file.yaml
Show resolved
Hide resolved
OK!
That's just a parameterized dynamic namespace, not a plugin. This can be changed though and not a problem.
These are simply nested namespaces for the parameters (no plugins, no dynamic sizing, etc), so I think these should just stay as-is. |
Sure! I was planning to do that after this PR.
I've resolved them locally for now.
Thanks for the review! |
eba20e3 to
b48ac7d
Compare
|
The last few commits include:
|
SteveMacenski
left a comment
There was a problem hiding this comment.
I think just the documentation updates I mentioned are left! Those are pretty important here since this is a big change that everyone's going to need to make. I would put this towards the top of the migration guide page (and make sure to update all the yaml/examples in the docs as well to match the code)
I am currently working on this. And while changing the documentation, I noticed that there is a |
|
Sure :-) Anymore? 😆 |
Who knows 😄 Maybe it's really better to leave it unmerged for now while I update the docs, in case anything else comes up. |
Signed-off-by: AJedancov <andrei.jedancov@gmail.com>
Keep comments and log messages intact Signed-off-by: AJedancov <andrei.jedancov@gmail.com>
Signed-off-by: AJedancov <andrei.jedancov@gmail.com>
Signed-off-by: AJedancov <andrei.jedancov@gmail.com>
Signed-off-by: AJedancov <andrei.jedancov@gmail.com>
Signed-off-by: AJedancov <andrei.jedancov@gmail.com>
Signed-off-by: AJedancov <andrei.jedancov@gmail.com>
Signed-off-by: AJedancov <andrei.jedancov@gmail.com>
Signed-off-by: AJedancov <andrei.jedancov@gmail.com>
4447641 to
75e37a5
Compare
|
I have opened PR ros-navigation/docs.nav2.org#854 for the documentation as you mentioned above, including information for migration guide. So if any improvements are needed, we can continue there. Additionally, the latest commit here updates some names in the behavior tree configurations for tests so they match their BT node names. |
|
@mini-1235 please sanity check that you don't see any more gaps :-) |
Basic Info
Description of contribution in a few bullet points
Plugin names have been changed to match the general style. The changes affected:
The text of logs and comments related to changed plugin names were also brought to a common format.
Description of documentation updates required from your changes
Nav2 documentation, code examples and configuration files.
Description of how this change was tested
colcon test.Future work that may be required in bullet points
Below are the names of parameters associated with plugins that haven't been changed. They may be changed in the future if corresponding changes are made to how names are used when creating topics, action and services.
behavior_server. These name id's are used as action servers names and therefore must comply with the current naming style.local_costmapandglobal_costmap. Plugin names are used as topics names when creating publishers (Costmap2DPublisher).local_costmapandglobal_costmap. Filter names are used as service names.bt_navigator.These plugin names in parameter files are not used when configuring groot. Instead, groot configuration uses default names like "navigate_to_pose" which are defined in the plugins themselves.
And if the names will be changed only in the configuration files, then at the plugin configuration stage will be implicitly created duplicate parameters with default names. On the other hand, we can't change the default names in plugins since they are also used as services names.
For Maintainers:
backport-*.