Skip to content

Port type missmatch between blackborad and subtree port #489

Closed
@farshbafdoustar

Description

@farshbafdoustar

I have an ActionNode (Action1) that has input port with std::vector type:

<BehaviorTree ID="Main">
   <SubTree ID="Subtree_A" states="1;2"/>
  </BehaviorTree>

<BehaviorTree ID="Subtree_A">
    <Sequence>
        <Action1 states="{states}"/>
    </Sequence>
  </BehaviorTree>

When I want to pass sth to this port through a wrapper Subtree, I got the following error:

The creation of the tree failed because the port [states] was initially created with type [std::string] and, later type [std::vector<int, std::allocator<int> >] was used somewhere else.

it seems that the blackboard item defined in Main tree is created by default with std::string type. Is there anyway to define the type for the blackboard items in advance or any workaround to handle such a situation?

Activity

facontidavide

facontidavide commented on Jan 2, 2023

@facontidavide
Collaborator

Let me see if I can replicate this issue locally

facontidavide

facontidavide commented on Jan 2, 2023

@facontidavide
Collaborator

is this the master branch (version 4.0.1?)

facontidavide

facontidavide commented on Jan 2, 2023

@facontidavide
Collaborator

fix pushed to master. thanks for reporting

farshbafdoustar

farshbafdoustar commented on Jan 2, 2023

@farshbafdoustar
ContributorAuthor

Wow, Thanks Davide!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Port type missmatch between blackborad and subtree port · Issue #489 · BehaviorTree/BehaviorTree.CPP