You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thanks for the great library!
I've had a look at the code in the devel branch, and entered the Sequence class method tick.
At line 561, you yield node.
Then, the code checks if the node is the child itself and the node status is SUCCESS.
Then, after some operations, you yield again and return.
I might be wrong, but I think the yield at line 561 is somehow in the wrong place.
Maybe it should be moved after the checks?
It's otherwise hard to reach those checks with the current version, right?
If I'm wrong, please can someone better explain the idea behind the code?
Thanks.
Best.
Stefano
The text was updated successfully, but these errors were encountered:
I am also wondering if the checks at line 542 and line 545 are correct.
The current version is:
elifself.memoryandcommon.Status.RUNNING:
assertself.current_childisnotNone# should never be true, help mypy outindex=self.children.index(self.current_child)
elifnotself.memoryandcommon.Status.RUNNING:
self.current_child=self.children[0] ifself.childrenelseNone
but I suppose it should be:
elifself.memoryandself.status==common.Status.RUNNING:
assertself.current_childisnotNone# should never be true, help mypy outindex=self.children.index(self.current_child)
elifnotself.memoryandself.status==common.Status.RUNNING:
self.current_child=self.children[0] ifself.childrenelseNone
or even better:
elifself.memory:
assertself.current_childisnotNone# should never be true, help mypy outindex=self.children.index(self.current_child)
else:
self.current_child=self.children[0] ifself.childrenelseNone
since as commented at line 549 these conditions should cover all variations
Hi,
Thanks for the great library!
I've had a look at the code in the
devel
branch, and entered theSequence
class methodtick
.At
line 561
, youyield node
.Then, the code checks if the node is the child itself and the node status is
SUCCESS
.Then, after some operations, you
yield
again andreturn
.I might be wrong, but I think the
yield
atline 561
is somehow in the wrong place.Maybe it should be moved after the checks?
It's otherwise hard to reach those checks with the current version, right?
If I'm wrong, please can someone better explain the idea behind the code?
Thanks.
Best.
Stefano
The text was updated successfully, but these errors were encountered: