-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call AcquisitionReport service after food-on-fork question #121
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. See comments for small discussion points.
/** | ||
* Callback function for when the user indicates that the bite acquisition | ||
* succeeded. | ||
*/ | ||
const acquisitionSuccess = useCallback(() => { | ||
console.log('acquisitionSuccess') | ||
toast.info('Reporting Food Acquisition Success!') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, does the toast persist across screens, or does it go away as soon as the screen shifts to Robot Motion? If the former, this is fine, but if the latter, I'd be concerned about this being a confusing UX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does persist across screens, in practice it's basically a quick overlay over the RobotMotion screen.
@@ -11,6 +11,7 @@ | |||
"axios": "^1.6.5", | |||
"body-parser": "^1.20.2", | |||
"bootstrap": "^5.1.3", | |||
"caniuse-lite": "^1.0.30001579", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where was this used? If unused, please remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't used in the code directly but appears to be used in the build process, as it quiets the warning about up to date browsers when running npm run build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically, running the npx
command that was present before during build installs this package.
Describe this pull request. Link to relevant GitHub issues, if any.
After any robot motion, the last reported action response is cached as part of the GlobalState.
After Bite Acquisition, this response is used to construct a call to AcquisitionReport, which updates the robot's online learning policy based on success or failure of the action.
Additionally, added a toast to the screen upon selecting whether to re-aquire or not.
Explain how this pull request was tested, including but not limited to the below checkmarks.
Tested on real with the
ros2-devel
branch of https://github.com/personalrobotics/ada_feedingNo python code changes: black not run
No change to user flow, so that box is not checked.
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
)