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

Impossible to write to global blackboard using output ports #823

Closed
robin-mueller opened this issue May 19, 2024 · 2 comments
Closed

Impossible to write to global blackboard using output ports #823

robin-mueller opened this issue May 19, 2024 · 2 comments

Comments

@robin-mueller
Copy link
Contributor

robin-mueller commented May 19, 2024

In my application I am trying to write to a global blackboard entry using setOutput of a tree node, but an entry in the local blackboard is created instead.

Let an example be:

<BehaviorTree ID="MainTree">
    <Sequence>
        <Script code="@global_var:=0"/>
        <SubTree ID="BugExample" />
    </Sequence>
</BehaviorTree>

<BehaviorTree ID="BugExample">
    <Sequence>
        <SetState in="1"/>
        <GetState out="{@global_var}"/>
    </Sequence>
</BehaviorTree>

The nodes SetState and GetState set respectively get the value of an internal state variable using the corresponding ports. With the latest version to date, global_var is created in the blackboard of MainTree with value 0 and @global_var in the blackboard of BugExample with value 1. The expected behavior would be that GetState updates the entry global_var in MainTree as I understand it.

I'd suggest to implement an example like this in the associated test to verify this issue, since I don't see that it is covered yet.

@robin-mueller
Copy link
Contributor Author

I've added the test in the pull request above.

I currently don't have too much time to look into it, but I assume the issue to have its origin here. storage_ is searched for a key @global_var which obviously cannot be found.

facontidavide pushed a commit that referenced this issue May 20, 2024
…#824)

* Add test for setting a global blackboard entry using a node's output port #823

* Add quotes to variable var5
@facontidavide
Copy link
Collaborator

fixed

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