Closed
Description
Hi Davide,
I am finding that when a parallel node halts a running child, its post conditions are not applied the way I expected. I have included an example below:
This tree starts and then halts a RunForever action node. The PrintString then prints the value of variable test
.
<BehaviorTree ID="test_tree">
<Sequence>
<Script code="test := 'start'"/>
<Fallback>
<Parallel failure_count="1"
success_count="-1">
<RunForever _onHalted="test = 'halted'"
_post="test = 'post'"/>
<AlwaysFailure/>
</Parallel>
<PrintString key="{test}"/>
</Fallback>
</Sequence>
</BehaviorTree>
I would have expected the onHalted
condition to run and 'halted' to be printed. However, 'post' was printed, indicating the post
condition was run. If I remove the post
condition, 'start' is printed, indicating onHalted
is not being run at all.
Thanks for your help!
Metadata
Metadata
Assignees
Labels
No labels