fawkesrobotics / fawkes

:robot: Fawkes Robot Software Framework
https://www.fawkesrobotics.org
64 stars 26 forks source link

Improve the tracking of sensed effects of nowait actions #17

Open morxa opened 5 years ago

morxa commented 5 years ago

Since commit f486472151e334d8813b812c448b86b3dfb7ef98, we also add a pending-sensed-fact for actions that do not wait for the effect to occur. This can be used to react properly if the effect does not ever occur as expected. One possible scenario:

  1. Prepare a machine, do not wait until it is READY-AT-OUTPUT.
  2. Drive to the output side
  3. Machine is not yet ready, monitoring needs to decide what to do (e,g., wait or fail). For this, we need to know whether we expect the machine state to change.

However, as it currently stands, if the effect does not occur, there are at least two problems:

This needs improvement, as pointed out in #12.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

timn commented 5 years ago

@morxa, can you please make some suggestions how to proceed here and improve the situation.

morxa commented 5 years ago

One idea is to introduce a new concept, let's call it a promise, with the following properties:

With promises, we would only mark a sensed effect as pending if we need to wait for it before we let the action finalize. Otherwise, it would be a promise. This means we could actually get rid of the nowait flag, and replace all sensed nowait effects with promises.

These are just brainstorming ideas. Let me know what you think.

Maybe @Sagre, @TarikViehmann, and @MostafaGomaa also want to comment.