Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Parallel node not able to be registered and used in an XML description #13

Closed
@mjeronimo

Description

@mjeronimo

To implement runing planning and control in parallel, I'd like to be able to use the ParallelNode in an XML description, something like this:

<root main_tree_to_execute="MainTree">
  <BehaviorTree ID="MainTree">
    <SequenceStar name="root">
      <ComputePathToPose endpoints="${endpoints}" path="${path}"/>
      <Parallel threshold_M="1">
        <FollowPath path="${path}"/>
        <Sequence>
          <RateController hz="2">
            <ComputePathToPose endpoints="${endpoints}" path="${path}"/>
          </RateController>
          <UpdatePath/>
        </Sequence>
      </Parallel>
    </SequenceStar>
  </BehaviorTree>
</root>

However, because the ParallelNode has the following signature:

BT::ParallelNode::ParallelNode(const std::string& name, int threshold_M)

it can't be registered and used in an XML description of the tree. I've worked around this for now by making the threshold value have a default value.

Metadata

Metadata

Assignees

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