Skip to content

Initialise input ports in code #405

@benoit-robotics

Description

@benoit-robotics

Hello,

I can't get my head around how to initialise the input ports of a node in the c++ code. I know how to initialise a port in the xml file.

I initialise my tree this way. For the sake of simplicity there is only one node.

  BT::BehaviorTreeFactory factory;
  // node
  factory.registerNodeType<PickUpObject>("PickUpObject");

  auto tree = factory.createTreeFromFile(tree_path);
  tree.tickRoot();

I want to find a way to set the value of an input port of the node in the code above. How can I do that ?
Thank you

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