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

Global Blackboard for Behvaiour Trees #315

Open
claudio-dg opened this issue Aug 21, 2024 · 1 comment
Open

Global Blackboard for Behvaiour Trees #315

claudio-dg opened this issue Aug 21, 2024 · 1 comment

Comments

@claudio-dg
Copy link

Hi @fmrico, i have been trying to use a global blackboard so that different nodes of different actions (i.e. of different trees) have access to the same values. To do so, I tried to follow the instructions at behaviorTree.docs, but unfortunately, I did not manage to set it up properly.

Trying to set a value in the ExecutorNode.cpp it seems to be not reachable by any node, while setting it in the BTAction.cpp, every tree presents a local copy of it, as a different blackboard is instantiated for each subtree when creating the BT.

Is there a way to use the plansys2 structure but adding a general blackboard that can be accessed from every Subtree directly?

@fmrico
Copy link
Contributor

fmrico commented Sep 2, 2024

Hi @claudio-dg

To have a global blackboard, we should modify plansys2_bt_actions/BTAction.cpp to use a blackboard provided externally, instead of creating its own blackboard. Next, you should instantiate all the actions in the same process in a main() function, providing all classes with the same blackboard object.

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

No branches or pull requests

2 participants