BehaviorTree.CPP icon indicating copy to clipboard operation
BehaviorTree.CPP copied to clipboard

Documentation for In/Out ports?

Open swarajpeppermint opened this issue 2 years ago • 1 comments

I am trying to use In/Out ports in the Behavior Tree. However I can't find any documentation on the main website. Is it documented somewhere?

swarajpeppermint avatar Aug 17 '22 12:08 swarajpeppermint

There are a couple of tutorials regarding input and output ports on the main website.

  • For passing input ports and using output ports, Tutorial 2 is a good place to start: https://www.behaviortree.dev/tutorial_02_basic_ports/
  • For utilizing your own custom data types with ports and custom BT nodes, Tutorial 3 should be helpful: https://www.behaviortree.dev/tutorial_03_generic_ports/
  • When working with ports and subtrees, Tutorial 6 talks about port remapping: https://www.behaviortree.dev/tutorial_06_subtree_ports/

Regarding port remapping and subtrees, I recommend utilizing SubTreePlus for subtrees as it uses a more consistent and capable form of port remapping than the standard SubTree https://github.com/BehaviorTree/BehaviorTree.CPP/blob/ef68cf1c2e9f30ad63e7e5f5fe4b10fe215db6a2/include/behaviortree_cpp_v3/decorators/subtree_node.h#L40-L79

asasine avatar Aug 29 '22 13:08 asasine