Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional node and node name arguments to tree setup #182

Closed
wants to merge 3 commits into from

Conversation

sea-bass
Copy link
Collaborator

@sea-bass sea-bass commented Sep 7, 2022

This PR aims to address my request in #181.

Specifically, I added a few extra arguments to the setup() method of py_trees_ros.trees.BehaviourTree:

  • node accepts an existing rclpy.node.Node object so instead of always creating a new node, it can accept an existing one.
  • node_name accepts the name of the node, if one is still created by setup().

This makes it so that I can create a derived class from Node that internally creates a behavior tree, and it can declare parameters / get parameter values ahead of the setup stage.

Copy link
Member

@stonier stonier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node changes look good.

py_trees_ros/trees.py Show resolved Hide resolved
py_trees_ros/trees.py Show resolved Hide resolved
py_trees_ros/utilities.py Show resolved Hide resolved
@stonier
Copy link
Member

stonier commented Jan 1, 2023

Thanks for seeding this!

I've broken this PR into three separate PR's (see below), so closing this one out in favour of those.

@sea-bass
Copy link
Collaborator Author

sea-bass commented Jan 1, 2023

Appreciate the cherry-picks, as now I don't have much to do but sit back, wait for the releases, and update my downstream repo when the time comes. Thanks!

@stonier
Copy link
Member

stonier commented Jan 2, 2023

No worries. I'm tracking the next ros-ecosystem release over in #174 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants