Skip to content
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

Use native library haltTree() #3950

Merged
merged 2 commits into from Nov 10, 2023
Merged

Conversation

doisyg
Copy link
Collaborator

@doisyg doisyg commented Nov 9, 2023


Basic Info

Info Please fill out this column
Ticket(s) this addresses (add tickets here #1)
Primary OS tested on (Ubuntu, MacOS, Windows)
Robotic platform tested on Dexory Robot

Description of contribution in a few bullet points

As discussed, draft to open the discussion.

Update to use the the native cpp library haltTree() method in BehaviorTreeEngine::haltAllActions.
https://github.com/BehaviorTree/BehaviorTree.CPP/blob/61c55ed720e0630f211686b3830942ae27e90501/include/behaviortree_cpp_v3/bt_factory.h#L162-L179

Before this change, only the active BT node was halted when finishing the action. After this change, all BT nodes halt() methods are called. This is very convenient to handle cleaning operation (switch off your lights when leaving) in halt().

Also updated nav2_behavior_tree::BtActionServer::haltTree() to use the same. It is used nowhere in nav2 but is useful for external users (like me) that want for instance to halt the tree on preemption.

Description of documentation updates required from your changes


Future work that may be required in bullet points

For Maintainers:

  • Check that any new parameters added are updated in navigation.ros.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

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (be370db) 90.30% compared to head (284daa7) 90.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3950      +/-   ##
==========================================
- Coverage   90.30%   90.05%   -0.26%     
==========================================
  Files         415      415              
  Lines       18450    18444       -6     
==========================================
- Hits        16662    16610      -52     
- Misses       1788     1834      +46     
Files Coverage Δ
...nclude/nav2_behavior_tree/behavior_tree_engine.hpp 100.00% <ø> (ø)
...ee/include/nav2_behavior_tree/bt_action_server.hpp 83.33% <ø> (ø)
...clude/nav2_behavior_tree/bt_action_server_impl.hpp 86.76% <100.00%> (ø)
nav2_behavior_tree/src/behavior_tree_engine.cpp 76.19% <100.00%> (-5.30%) ⬇️

... and 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

I see no downside - why a draft?

@doisyg doisyg marked this pull request as ready for review November 10, 2023 03:52
@doisyg
Copy link
Collaborator Author

doisyg commented Nov 10, 2023

Switching to PR ;)

@doisyg
Copy link
Collaborator Author

doisyg commented Nov 10, 2023

I guess a note on the migration guide ?

doisyg added a commit to doisyg/navigation.ros.org that referenced this pull request Nov 10, 2023
@doisyg
Copy link
Collaborator Author

doisyg commented Nov 10, 2023

Docs: ros-navigation/docs.nav2.org#487

SteveMacenski pushed a commit to ros-navigation/docs.nav2.org that referenced this pull request Nov 10, 2023
@SteveMacenski
Copy link
Member

Honestly not sure if that was worth a migration guide doc since its not actionable to users, but I'll always default to more docs over less docs 😉

@SteveMacenski SteveMacenski merged commit 5053226 into ros-navigation:main Nov 10, 2023
6 of 7 checks passed
jwallace42 pushed a commit to jwallace42/navigation2 that referenced this pull request Jan 3, 2024
* Use native library haltTree()

* lint

---------

Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
Signed-off-by: gg <josho.wallace@gmail.com>
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.

None yet

2 participants