-
Notifications
You must be signed in to change notification settings - Fork 631
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
changing resetStatus to public #579
Conversation
@facontidavide let me know if you have thoughts (I'm sure you will 😉) |
If you want to reset the root node, why not using The name is not that intuitive, but it will do exactly what you want to do. |
Because there is no tree. I'm trying to write unit tests of nodes. For example: https://github.com/ros-planning/navigation2/blob/main/nav2_behavior_tree/test/plugins/decorator/test_single_trigger_node.cpp |
About the PR, if you make it protected, I will accept it, since it is protected in BT.CPP 4.X I know it is not the subject of this PR, but I find this very confusing It is hard for me to see how this has ANY effect in practice. The parent of The only place where it MAY make sense if in a |
On the PR: done! On otherwise: In case you want to do something like "no replanning" so you place the planner BT node under this "only once" so that its skipped for all over traversals of the tree during a particular run while its parent node is I agree it has some limited use due to the IDLE reset of the parent, but for the example below, if we replaced the Rate Controller (orange) with this node, then it would trigger one time only for planning. The IDLE reset actually works in our favor because the parent of that node is always RUNNING except when there's a system level failure exiting the "navigation" side of the tree for the "recovery" side of the tree. Then once we come back, the reset to IDLE makes it so that we retrigger planning 1 time again to continue the task in the new state. So basically, its mostly useful on the context that its parent is the main control node of the branch or BT. So if it leaves that context, it'll retrigger once, but not repeatedly within the "normal" bounds of operation of that particular branch. Might also be worth noting the custom control flow nodes we use. |
I am confused... the most basic nodes, Now, what I understand is that probably you are trying to deal with a different logic introduced by your custom Control Nodes which don't follow the same rules as the "official ones" in BT.CPP. In your example, you should just replace the But probably I am missing something, so... I guess you know what you are doing! |
Perhaps, but I also didn't write the PipelineSequence node but I did have a section of the website written up explaining it https://navigation.ros.org/behavior_trees/overview/nav2_specific_nodes.html#control-pipelinesequence It might be that there was a different / better way to do it, but its been working for so long I haven't had a reason to argue with it. I think the same could be useful with default control nodes, but certainly this is a quirk that is most interesting to us due to it.
True. But its still a general primitive that has utility. There were some users asking for it, but I don't recall the exact context at this moment in their applications. @facontidavide can you do a 3.8 release so we can get this into binary format & I can merge the test fix into Nav2? |
@facontidavide can you cut a release for 3.8.4 and release to bloom so these changes can be reflected? Its the last thing to get our CI green https://app.circleci.com/pipelines/github/ros-planning/navigation2/9624/workflows/32358c53-3f64-44a8-a92e-75bdf30b0547/jobs/30813/tests |
Needed for unit test coverage to reset the root nodes. I can appreciate that this is to prevent users from doing unwise things, but I think at least a reset option is a necessary public method even if
setStatus
is not.At the absolute least, it needs to be a protected member so I can access it from a shim node for testing - that would be fine as well!