| 466 | } |
| 467 | |
| 468 | Tree BehaviorTreeFactory::createTree(const std::string& tree_name, |
| 469 | Blackboard::Ptr blackboard) |
| 470 | { |
| 471 | // Set the polymorphic cast registry on the blackboard (Issue #943) |
| 472 | blackboard->setPolymorphicCastRegistry(_p->polymorphic_registry); |
| 473 | |
| 474 | auto tree = _p->parser->instantiateTree(blackboard, tree_name); |
| 475 | tree.manifests = this->manifests(); |
| 476 | tree.remapManifestPointers(); |
| 477 | return tree; |
| 478 | } |
| 479 | |
| 480 | void BehaviorTreeFactory::addMetadataToManifest(const std::string& node_id, |
| 481 | const KeyValueVector& metadata) |