豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Remove default values for input ports on IsGoalNearby condition to behave in line with similar nodes#6097

Open
fabmene wants to merge 6 commits intoros-navigation:mainfrom
fabmene:main
Open

Remove default values for input ports on IsGoalNearby condition to behave in line with similar nodes#6097
fabmene wants to merge 6 commits intoros-navigation:mainfrom
fabmene:main

Conversation

@fabmene
Copy link
Copy Markdown

@fabmene fabmene commented Apr 20, 2026

Basic Info

Info Please fill out this column
Ticket(s) this addresses #6096
Primary OS tested on Ubuntu
Robotic platform tested on Simulation of custom robot
Does this PR contain AI generated software? No
Was this PR description generated by AI software? No

Description of contribution in a few bullet points

  • Removal of default values for input ports for frame ids - if input ports are not provided, the node is supposed to fall back to ros parameters. This is in line with other behavior nodes.
  • Documentation of input ports for frame ids

Description of documentation updates required from your changes

https://docs.nav2.org/configuration/packages/bt-plugins/conditions/IsGoalNearby.html lists default values as base_link and map. Those are technically not the default values for the input ports any longer, but are still the defaults for the parameters, to which this node will fall back if no input ports are provided. So the documentation does not need an update, as it now matches exactly how e.g. GoalReached behaves and is documented.

Description of how this change was tested

  • Updated existing unit tests to set frames through parameters on the node
  • Added additional unit tests where a non-standard frame is used

Future work that may be required in bullet points

For Maintainers:

  • Check that any new parameters added are updated in docs.nav2.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists
  • Should this be backported to current distributions? If so, tag with backport-*.

fabmene added 3 commits April 20, 2026 12:55
…arams

Signed-off-by: Fabian Menebröker <fabian.menebroeker@iml.fraunhofer.de>
Signed-off-by: Fabian Menebröker <fabian.menebroeker@iml.fraunhofer.de>
Signed-off-by: Fabian Menebröker <fabian.menebroeker@iml.fraunhofer.de>
fabmene added 3 commits April 20, 2026 16:26
Signed-off-by: Fabian Menebröker <fabian.menebroeker@iml.fraunhofer.de>
Signed-off-by: Fabian Menebröker <fabian.menebroeker@iml.fraunhofer.de>
Signed-off-by: Fabian Menebröker <fabian.menebroeker@iml.fraunhofer.de>
Copy link
Copy Markdown
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, thanks!

@SteveMacenski
Copy link
Copy Markdown
Member

@fabmene please fix the linting:



--- nav2_behavior_tree/test/plugins/condition/test_is_goal_nearby.cpp
+++ nav2_behavior_tree/test/plugins/condition/test_is_goal_nearby.cpp.uncrustify
@@ -39,2 +39,2 @@
-      return std::make_unique<nav2_behavior_tree::IsGoalNearbyCondition>(name, config);
-    };
+        return std::make_unique<nav2_behavior_tree::IsGoalNearbyCondition>(name, config);
+      };
@@ -53 +53 @@
-  void TearDown() override { tree_.reset(); }
+  void TearDown() override {tree_.reset();}


...


Error: /__w/navigation2/navigation2/nav2_behavior_tree/test/plugins/condition/test_is_goal_nearby.cpp:308:  Lines should be <= 100 characters long  [whitespace/line_length] [2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IsGoalNearby condition ignores frame parameters of BT navigator

2 participants