Robotics StackExchange | Archived questions

Switch node in py_trees version 0.7.6?

Hi, I'm using pytrees version 0.7.6, along with pytrees_ros version 0.6.1.

I installed these packages using sudo apt install ros-noetic-py-trees and sudo apt install ros-noetic-py-trees-ros. Is there a Switch node like in behaviortreecpp, which take a certain value from the blackboard and execute the equivalent child node and ignore the rests?

For example: a "Choosemode" node has 2 child nodes: "Mode1" and "Mode2". The parent node take a blackboard key: "mode", the key has value "1", then "Mode1" is executed and "Mode_2" is skipped.

I see that pytrees version 2.1.6 has an "eitheror" function but it's only compatible with ROS 2, while I'm using ROS 1.

Does the package already have an available one, or I have to write one by my own? If so, is there a tutorial for it?

Asked by Kevin1719 on 2022-05-13 05:43:40 UTC

Comments

Answers