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

Tips to implement "long running or infinite time actions" #67

Open
h-sh-h opened this issue May 7, 2024 · 0 comments
Open

Tips to implement "long running or infinite time actions" #67

h-sh-h opened this issue May 7, 2024 · 0 comments

Comments

@h-sh-h
Copy link

h-sh-h commented May 7, 2024

Hi
Thank you for providing such great library.
I am currently implemented to behaviors in ros2 and now i designed a behavior tree using back-chaining method. My problem is that some actions in my behavior tree should run for an infinite time until a certain condition changed. For example suppose I have a behavior tree like below :

image

All "Scripts" in above behavior tree are implemented as action servers and all "ScriptConditions" are implemented as SubTopics in ROS2.

The challenge I am currently facing is that as long as no one is visible for the robot, it should search for a person in the room. It means that it should run a long running or infinite action of searching until "Is Any Person Visible" condition is met and it will automatically "halt" the search action and start another infinite action of approaching that person until another condition of "Can High Five To Person" is met. After that it will "High Five and Shut Down".

I can easily implement the behaviors such that they never return success and keep running forever until they fail for some reason (for example missing the person in case of approaching that person action). The problem is that the behavior-tree send "Goal Timeout" after some time and change the action node state to failure resulting in running that action again and again.

One could argue that the action should return "success" whenever the condition is met but isn't the success condition of behavior or action already defined in behavior tree ? for example for the action "Search For A Person In The Room" to be successful, "Is Any Person Visible?" should return success.

I would be very thankful if anyone could help me with this.

@h-sh-h h-sh-h changed the title Tips to implement "long running or infinite actions" Tips to implement "long running or infinite time actions" May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant