splintered-reality / py_trees_ros

ROS extensions and implementations for py_trees
Other
143 stars 40 forks source link

Enhance the subscribers.ToBlackboard behaviour with non-blocking policy #214

Open GiancarloAllasia opened 1 year ago

GiancarloAllasia commented 1 year ago

I would like to propose to add the functionality to this behavior to decide to return SUCCESS or FAILURE, not only RUNNING, if no data has arrived yet on the subscribed ROS topic. This comes from a problem that I have with a node that manages an image classification algorithm and just publishes on the topic whenever there are objects classified in the current frame. I need my BT to be subscribed to that topic (among others) and put on the BB just the last message, IF ARRIVED. Otherwise, go on checking other topics (with all the other subscribers appended to a sequence control node as seen in tutorials).

sorawit112 commented 10 months ago

I think the easy way is add decorator RunningIsFailure as Parent of Subscriber