Open SyZbidi opened 3 months ago
i have the same problem.
i do not know how to use a blackboard variables.
I have used the subscribers.ToBlackboard Class
jointstates_to_blackboard = py_trees_ros.subscribers.ToBlackboard(
name="jointstates_to_blackboard",
topic_type=JointState,
topic_name="/joint_states",
qos_profile=py_trees_ros.utilities.qos_profile_unlatched(),
#blackboard_variables={'jointstate': None}
blackboard_variables={'JointStateName': 'name'}
)
And i see in the watcher that the variable is there but when i use
myblackboardvar = py_trees.blackboard.Blackboard.get(variable_name='/JointStateName')
i also get the KeyError
Here a additional picture of my usage.
It can be seen that the key /JointStateName is existing. By the key method i also can get it from the blackboard but with get i get a keyError
Hello,
I created an Image subscriber that writes the image it receives on a blackboard, with the intent to add it at the top of the tree so that every behavior that would need it has access to its blackboard.
I defined a small root tree with the image_subscriber in it at first
then I import that root in my subtree and try to
get
the image_subscriber blackboard variable but it fails there withKeyError: '/camera_feed_image'
. Here's how I'm trying to get the value of BB variable in the subtreeTo be used in an action client
So I'm guessing maybe I haven't properly created the ImageSubscriber? are the keyboard variables not global in this case?
This is my ImageSubscriber behavior
Thank you in advance for your help