rock-core / tools-roby

The roby plan manager
Other
3 stars 11 forks source link

coordination: fix #wait in task scripts where the event is a task's child's #58

Closed doudou closed 7 years ago

doudou commented 7 years ago

To ensure the event's presence, the implementation was adding the task as a dependency. It was however setting up this dependency with the waited-on event in success and remove_when_done set, which means that the child was removed after the wait no matter what.

This changes the handling so that all code paths go through explicit when_unreachable / on handling instead of using the dependency relation to handle the checks. Moreover, it generates a unique role name so that the dependency can be removed while leaving the existing relations unchanged.