py_trees_ros icon indicating copy to clipboard operation
py_trees_ros copied to clipboard

Consider allowing passing existing ROS2 Node object to `setup()` method of `py_trees_ros.trees.BehaviourTree`

Open sea-bass opened this issue 2 years ago • 0 comments

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:

  1. 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.
  2. 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.

sea-bass avatar Sep 05 '22 03:09 sea-bass