py_trees_ros
py_trees_ros copied to clipboard
Consider allowing passing existing ROS2 Node object to `setup()` method of `py_trees_ros.trees.BehaviourTree`
In py_trees_ros.trees.BehaviourTree
, the setup()
method always creates a new node named "tree".
I have two requests, which if you agree with, I would be happy to put up a PR:
- Can we consider optionally passing in an existing ROS2 node object in
setup()
, instead of having the tree always create its own node? This allows us to instantiate a ROS enabled BT inside an already created Node (or Node-derived) object. - Right now, the node name is defaulted to "tree". Consider adding an optional argument to change the name, provided an existing node isn't passed in as per the previous item.