Describe this pull request. Link to relevant GitHub issues, if any.
Joint with ada_feeding#169, this PR adds the web app capability to auto-continue once food has consistently been (not( detected on the fork for 3 seconds, both in BiteDone and BiteAcquisitionCheck, and auto-continue if so. The user has the option to decide whether to enable or disable this auto-continue. The 5 secs and probability threshold are currently hardcoded; customizing them from the settings menu will be another PR.
Explain how this pull request was tested, including but not limited to the below checkmarks.
Test with dummy nodes:
[x] Start code as per usual: python3 src/ada_feeding/start.py --sim dummy
[x] Bite Done:
[x] Navigate to the Bite Done page. Verify that Auto-Continue is unchecked by default.
[x] Open up the console to see when FoF is predicting 1 (food on fork).
[x] While FoF is predicting 1, check the auto-continue box. Verify that the next time it predicts 0 (no FoF), a 5 second countdown starts. Once that countdown terminates, it should automatically move away and back above plate.
[x] Go back to BiteDone. During the countdown at >1s, uncheck the box. Verify that the countdown stops and app does not move on.
[x] While FoF is predicting 0, recheck the box. Verify that the countdown starts, but as soon as FoF switches to 1 (hopefully before the 5s countdown ends -- if not, wait longer before checking the box), the countdown stops and app does not move on.
[x] While FoF is predicting 1, check the box. During the countdown at <=1s, uncheck the box. Verify that the countdown stops and app does not move on.
[x] Bite Acquisition Check:
[x] Navigate to the Bite Acquisition Check page. Verify that Auto-Continue is unchecked by default.
[x] Open up the console to see when FoF is predicting 1 (food on fork).
[x] While FoF is predicting 1, check the auto-continue box. Verify that it starts counting down and moves to the staging configuration.
[x] Go back to BiteAcquisitionCheck. During the countdown at >1s, uncheck the box. Verify that the countdown stops and app does not move on.
[x] While FoF is predicting 0, recheck the box. Verify that the countdown starts and it moves back above the plate.
[x] From BiteDone, go back to the resting configuration. From there, verify it doesn't auto-continue.
[x] Uncheck the box during a countdown for FoF and verify it stops the countdown and doesn't continue.
[x] Uncheck the box during a countdown for no FoF and verify it stops the countdown and doesn't continue.
[x] Close code as per usual: python3 src/ada_feeding/start.py --sim dummy -c
Test on the real robot:
[x] Start code as per usual: python3 src/ada_feeding/start.py --sim dummy
[x] Bite Done:
[x] Navigate to BiteDone with real food on the fork. Verify that it doesn't move away.
[x] Adversarially move your head around behind the fork, verify that it doesn't move away.
[x] Eat the bite. While your mouth is on the fork, adversarially move it around. Verify it doesn't move away.
[x] Take your mouth off of the fork but leave the bite on. Verify that it doesn't move away.
[x] Eat the bite, but keep your mouth touching the fork tip. Verify that it does not move away.
[x] Move your mouth back. Verify that it does move away.
[x] Re-do a whole bite, eat the bite normally, verify that it works as expected.
[x] Adversarially try many different actions, verify that it feels safe.
[x] Bite Acquisition Check:
[x] Navigate to BiteAcquisitionCheck with real food on the fork. Verify that it moves away.
[x] Navigate to BiteAcquisitionCheck with no FoF. Verify that it moves back above the plate.
[x] Navigate to BiteAcquisitionCheck with no FoF. During the countdown, touch the fork. Verify the countdown stops. Remove your finger before the new countdown ends. Verify that it doesn't auto-continue.
[x] During a countdown, uncheck the box. Verify it doesn't continue.
[x] Be adversarial. Verify it works.
Before creating a pull request
[x] Format React code with npm run format
[x] Format Python code by running python3 -m black . in the top-level of this repository
[x] Thoroughly test your code's functionality, including unintended uses.
[x] Fully test the responsiveness of the feature as documented in the Responsiveness Testing Guidelines. If you deviate from those guidelines, document above why you deviated and what you did instead.
[x] Consider the user flow between states that this feature introduces, consider different situations that might occur for the user, and ensure that there is no way for the user to get stuck in a loop.
Before merging a pull request
[ ] Squash all your commits into one (or Squash and Merge)
Describe this pull request. Link to relevant GitHub issues, if any.
Joint with
ada_feeding
#169, this PR adds the web app capability to auto-continue once food has consistently been (not( detected on the fork for 3 seconds, both in BiteDone and BiteAcquisitionCheck, and auto-continue if so. The user has the option to decide whether to enable or disable this auto-continue. The 5 secs and probability threshold are currently hardcoded; customizing them from the settings menu will be another PR.Explain how this pull request was tested, including but not limited to the below checkmarks.
Test with dummy nodes:
python3 src/ada_feeding/start.py --sim dummy
Auto-Continue
is unchecked by default.Auto-Continue
is unchecked by default.python3 src/ada_feeding/start.py --sim dummy -c
Test on the real robot:
python3 src/ada_feeding/start.py --sim dummy
Before creating a pull request
npm run format
python3 -m black .
in the top-level of this repositoryBefore merging a pull request
Squash and Merge
)