Skip to content

Conversation

armgits
Copy link
Contributor

@armgits armgits commented Oct 8, 2025


Basic Info

Info Please fill out this column
Ticket(s) this addresses #5566
Primary OS tested on Ubuntu
Robotic platform tested on Turtlebot 3 Loopback Simulation
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

  • Added a new function to check if the tolerance circle for goals in lethal zones are actually feasible to pick another valid goal within that region.
  • Also corrected description for a function getCoords in Node2D class.

Description of documentation updates required from your changes

--

Description of how this change was tested

  • Unit tests pass (Also slightly updated the unit test to test the new function)
  • Path planning works normally in the simulation

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-*.

Copy link

codecov bot commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
...planner/include/nav2_smac_planner/goal_manager.hpp 100.00% <100.00%> (ø)
...smac_planner/include/nav2_smac_planner/node_2d.hpp 100.00% <ø> (ø)

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@armgits
Copy link
Contributor Author

armgits commented Oct 9, 2025

I think making isZoneValid a member function of Node than GoalManager as of right now might make more sense, it could be used for some other use cases too.

@SteveMacenski
Copy link
Member

Thanks for adjusting the implementation, I had a score of things I was going to say but this implementation is much better and removes the redundant checks.

I think making isZoneValid a member function of Node than GoalManager as of right now might make more sense, it could be used for some other use cases too.

Such as?

@armgits
Copy link
Contributor Author

armgits commented Oct 9, 2025

Such as?

I don't have any specific cases right now, but I find this function as a more wider/approximate version of isNodeValid so in any case where validating the node's region works vs. precisely the position/node itself. Or it could be done when that need actually comes 😄

@SteveMacenski
Copy link
Member

SteveMacenski commented Oct 10, 2025

I think we should leave it in the goal manager for now, but keep an eye on that in the future in case that turns out to be useful as well! I think it creates a bit of complexity to have a Node itself creating and calling other Nodes to collision check in a region. That seems ... odd. Definitely something we could do, but we have other places in the goal manager already we call isNodeValid so I think this fits there perfectly fine and doesn't make first-time developers brains hurt with thinking about different instances of the same object class ... within the implementation details of a particular node class. Sometimes we make choices that are for the casual developer's benefit :-)

@armgits
Copy link
Contributor Author

armgits commented Oct 10, 2025

Yea I agree with that as well, we'll keep it this way and I'll iron out the rest.

Signed-off-by: Abhishekh Reddy <[email protected]>
Copy link
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.

Otherwise LGTM - anything else we should consider before merging?

Signed-off-by: Abhishekh Reddy <[email protected]>
@armgits
Copy link
Contributor Author

armgits commented Oct 13, 2025

anything else we should consider before merging?

It looks good to me too, we can merge after the CI passes.

@SteveMacenski SteveMacenski merged commit b91eda5 into ros-navigation:main Oct 14, 2025
14 of 15 checks passed
Jad-ELHAJJ pushed a commit to Jad-ELHAJJ/navigation2 that referenced this pull request Oct 16, 2025
…ath planning. (ros-navigation#5593)

* Implemented goal tolerance validity check

Signed-off-by: Abhishekh Reddy <[email protected]>

* Fixed description for getCoords function

Signed-off-by: Abhishekh Reddy <[email protected]>

* Added a test with lower tolerance for zone validity checking

Signed-off-by: Abhishekh Reddy <[email protected]>

* Updated tolerance check function implementation

Signed-off-by: Abhishekh Reddy <[email protected]>

* Updated isZoneValid function

Signed-off-by: Abhishekh Reddy <[email protected]>

* Updated isZoneValid function

Signed-off-by: Abhishekh Reddy <[email protected]>

---------

Signed-off-by: Abhishekh Reddy <[email protected]>
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.

nav2_smac_planner: check goal validity even when tolerance is non zero

2 participants