forester-bt / forester

unleash the power of behavior trees!
https://forester-bt.github.io/forester/
Apache License 2.0
35 stars 5 forks source link

Add halt for flow, decorator and sync action nodes. #69

Closed samouwow closed 3 months ago

samouwow commented 3 months ago

This PR modifies the r_sequence and r_fallback flow nodes to call "halt" on any running children if an earlier child returns false or true, respectively.

It does not implement halting for parallel nodes or async/remote action nodes.

This PR is part of #65

besok commented 3 months ago

Great work! Thanks for the PR. I will take a look on friday!

besok commented 3 months ago

Thank you for the great PR. The idea is very nice. I have left a couple of notes but apart of that it looks good to me.

samouwow commented 3 months ago

Thanks for the quick review.

I've implemented all your suggestions except the formatting one, since I'd rather just keep letting cargo fmt do its thing.