-
Notifications
You must be signed in to change notification settings - Fork 768
Closed
Description
I'm creating a class that inherits from BT::StatusChangeLogger
. In this class I want to collect extra data including what is currently in the nodes' Blackboard (keys/values) at the time of the callback
function. Since my tree has multiple nodes with various input and output ports, I do not know the key strings from within callback. I've been trying the following but it crashes once it reaches getKeys()
.
void Metrics::callback(BT::Duration timestamp, const BT::TreeNode& node,
BT::NodeStatus prev_status, BT::NodeStatus status)
{
BT::Blackboard::Ptr bb(node.config().blackboard);
if (!bb )
{
ROS_WARN("Getting keys");
std::vector<BT::StringView> keys = bb->getKeys();
ROS_WARN("GOT Keys");
}
}
[ WARN] [1588786259.942270451, 1588786258.704000000]: Getting keys
[behavior-1] process has died [pid 127, exit code -11, cmd ...behavior_trees_node __name:=behavior
In running in a debugger an exception happens on out.reserve( storage_.size() );
BehaviorTree.CPP/src/blackboard.cpp
Line 78 in cc3f0d9
out.reserve( storage_.size() ); |
Leading me to suspect maybe my method of getting the blackboard is incorrect.
Is what I want to do supported by the API, and if so what is the correct way to do it?
Thanks.
Metadata
Metadata
Assignees
Labels
No labels