Gathering ROS messages for the Blackboard with different data rates #217
valschmidt
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to follow the paradigm described in the Data Gathering Tutorial. It's not fully supported yet in the version I'm using, I'm struggling to make it work, and I need some help.
I'm using py_trees v 0.7.6 and py_trees_ros v0.6.1, and I know these are old, but it is what's available via apt for noetic. I realize asking for help for versions that are so dated is asking a lot.
I have three message topics that I want to post to the Blackboard. Two come at 10Hz and the second comes only when the an event is triggered.
One out of the ordinary thing about my setup - I have a new Behavior, ToLocalBlackboard, which inherits from ToBlackboard, and overrides setup() allowing me to replace the blackboard created by ToBlackboard and pass in my own in instead. This allows me to create a single globally accessible blackboard. I did this because the blackboard
Client
method is not yet supported and I didn't see another way to access it.Anyway, here's the setup:
This looks something like this:
My first question, in the example in the tutorial the
battery2bb
element is aSequence
. Why? WhenToBlackboard.update()
doesn't have a message it returnsRUNNING
. Doesn't this block, and so won'tbattery2bb
block until messages are received on all topics? To try to prevent this, my Data2BB element is aParallel
composite. I'm not sure it's working how I hoped.But in any case, I find that if the slow data rate topic is listed first in the
Data2BB
sequence like this:data2bb.add_children([behavior2BB, asvpos2BB,mesobotpos2BB])
I never get data from any of the topics into the bulletin board. If I put it last, like this:
data2bb.add_children([asvpos2BB,mesobotpos2BB, behavior2BB])
I get data from the other two higher rate topics, but I never see any data at all from the slow rate topic. And if I remove the higher rate topics altogether, like this:
data2bb.add_children([behavior2BB])
the slow data rate topics comes through ok.
How should I architect this so that all messages populate the blackboard all the time?
Beta Was this translation helpful? Give feedback.
All reactions