- Hi, I'm using the beaviortree_cpp_v3. I am puzzled with the mechanism of creating the tree
Tree createTreeFromFile(const std::string& file_path, Blackboard::Ptr blackboard = Blackboard::create()); The second parameterBlackboard::Ptr blackboard = Blackboard::create()) is always accomplished with the tree. However, this blackboard can only by modified and the value can only be get outside the inner action. I don't know why the creation of a tree must be with this blackboard, although the second parmaeter is always implictly ignored. Now I have a question. What contents are the blackboard recorded? I don't understand the value of the blackboard with the tree. I want to record if the action has been executed in global. Next time run in this action, it shouldn't run multiple times if this action is recorded. I wonder if I can use the blackboard with the tree? However, I find the action constructor is separated with the tree, which means the single action cannot get the blackboard that accompanies the tree. The action does not have link with the whole tree.
class Test_Action_1 : public BT::SyncActionNode { public: Test_Action_1(const std::string& name, const BT::NodeConfiguration& config) : BT::SyncActionNode(name, config) {}
- Or is there other methods to record the action execution situation. More importantly, the recorded situation shouble be shared by all the actions. Thank you.
|