[Nav2] Best way to incorporate the UI into a behavior tree
I am looking for the best practice how to implement the response from UI into Nav2 stack especially into the behavior tree. For instance, I have "Start/stop" button which publishes current button state in a topic (std_msgs::Bool) and I would like to react in the Nav2 on this state. At first glance, make sense to create a new decorator sort of "MovingIsAllowed" which will be listen to my state topic. And then to create the behavior tree like on the following image:
Is it okay? Maybe there are any other approaches? Or is there ready to use example already in ROS/Nav2?