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

Request: Documentation and/or Example of Switch Node #499

Open
gracideasg opened this issue Jan 27, 2023 · 2 comments
Open

Request: Documentation and/or Example of Switch Node #499

gracideasg opened this issue Jan 27, 2023 · 2 comments
Labels
documentation Improve the documentation

Comments

@gracideasg
Copy link

I am interested in using the Switch node (Switch2, to be specific), but am unable to find any documentation on it apart from the header file switch_node.h. Could you provide a skeleton of what an xml file implementing this node would look like? I had no clue this node even existed until I saw it on Groot, since there is no mention of it in the nodes library on https://www.behaviortree.dev/.

@facontidavide
Copy link
Collaborator

facontidavide commented Feb 3, 2023

I am happy to help, but isn't this a sufficient explanation?

https://github.com/BehaviorTree/BehaviorTree.CPP/blob/v4.0/include/behaviortree_cpp/controls/switch_node.h#L19-L41

Of course, adding documentation on https://www.behaviortree.dev/ is good, but with a growing list of nodes, it is hard to cover everything.

@facontidavide facontidavide added the documentation Improve the documentation label Feb 3, 2023
@facontidavide
Copy link
Collaborator

Additionally, since version 4.0, Switch node is kind of obsolete and easily replaceable with preconditions!
https://www.behaviortree.dev/docs/tutorial-advanced/pre_post_conditions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improve the documentation
Projects
None yet
Development

No branches or pull requests

2 participants