FSM ‘Check After State Finished’ not working for action state

NodeCanvas Forums General Discussion FSM ‘Check After State Finished’ not working for action state

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17734
    playboi14
    Participant

    Hi

    I’ve ran into an issue with a FSM’s state action. When you have a state set as ‘Repeat Action Task’, it repeats continually as expected. Right now I’ve just got 2 tasks, wait got 1s and then do my task (returning true or false based on if a target is found)
    (the Select Target state)
    Screenshot-2024-06-14-111016

    I’ve noticed that the conditions to the right, where I check if a destination was found (blackboard variable) are never assessed. When I change the operating mode to ‘Check Continually’ on the state, it works, but that causes other issues for me, I need to be able to trigger these checks after the given actions have all executed before they all start again.

    (here is the main flow of logic)
    Screenshot-2024-06-14-110223

    I’ve checked the documentation PDF but can’t find anything explaining how ‘Check after state finished’ and ‘check continually’ work, so I’m not sure how to proceed.

    Essentially in my example, I want to run the ‘Select Target’ state repeatedly and at the end i’ll be checking if a ‘destination’ was found, if it was the state moves on, if it doesn’t it goes to the ‘not found target’ state, increments a counter and then depending on that counter it either tries to select another ‘target’ or it jumps back to an earlier state of the machine and does logic.

    I can’t seem to get this to work and would really appreciate any help on how to get these repeaters to work

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

    Hello,

    Because the actions are set to ‘Repeat’, the State is never ‘finished’ since the actions repeat forever, and as such the transitions are never checked. There is currently no mode that does exactly what you suggest, but I can look at adding another new mode (I can’t change the way “Check After State Finished” currently works to keep backwards compatibility).

    However while what you are after does make sense when the actions are set to ‘Run In Sequence’ like in your example (since there is a specific point that all actions have ended and restart), it will be problematic when the actions are set to “Run In Parallel” (since there is no specific point that all actions have ended because as soon as once does it immediately restarts regardless of whether or not the other actions in the list are still running). That difference makes me skeptical add such new mode because it won’t/can’t be consistent.

    Let me know what you think.
    Thanks.

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

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