Nested Dynamic nodes don't seem to reset the currently running child

NodeCanvas Forums Support Nested Dynamic nodes don't seem to reset the currently running child

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12552
    handsomegeoff
    Participant

    Hi there,

    First of all, I’d like to compliment you on the quality of your product. It’s definitely done wonders in speeding up my workflow and I have found no meaningful problems with it, at least up until a little bug that I ran into tonight. (Or maybe I’m not understanding something correctly)

    #Edit#
    I’ve found that when you deactivate and re-activate a branch in a behavior tree through a nested dynamic composite, the branch doesn’t start executing again from the left most node (resetting the tree); Instead, it will resume the branch from the node that was last active before being interrupted. Below is a more detailed description.

    In the use case below, I have a set of nested dynamic composites.

    – At start, the first branch fails the condition and it continues to execute the second branch (Capture02.png)
    – If I change the properties such that the first branch activates, it will run through as expected. (Capture03.png)
    – Now, I readjust the properties so that the first branch deactivates and the second branch starts executing again. (Capture04.png)
    – Finally, I once again adjust the properties to reactivate the first branch (Capture05.png). Here is where the strange behavior comes into play. It doesn’t start executing at the left most node again. It goes directly to the last active node (being the right most in this case). Messaging events aren’t sent and the break point is skipped.

    I have used Behavior Designer in the past, based on my experiences with it (and other BT assets), I would expect the entire branch to be reset and be executed again… that said, I can think of a couple corner cases where it might be advantageous to go back to the last executed node. Is this expected behavior, or a bug?

    I have found a work around. If I move everything following the condition under a new static sequence, it resets all children as expected and the full branch executes again.

    Attachments:
    You must be logged in to view attached files.
    #12557
    handsomegeoff
    Participant

    Here is the screen grab of my work around.

    Attachments:
    You must be logged in to view attached files.
    #12560
    Gavalakis
    Keymaster

    Hello,

    Thanks a lot for your positive feedback as well as of course for the error report.
    This is indeed an “unexpected behavior” and I was able to pinpoint the cause.
    To fix this quickly, please open up Sequencer.cs and change the closure at line #43..
    From this:

    To this:

    Please let me know if that works for you as expected and once again thank you for the clean report as well as your positive feedback!
    If you encounter anything else, please let me know.

    Join us on Discord: https://discord.gg/97q2Rjh

    #12562
    handsomegeoff
    Participant

    Great! Thank you for the support. I will try this over the weekend and let you know if I run into any more problems.

    #12566
    Gavalakis
    Keymaster

    You are very welcome! Please let me know if so 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.