Describe this pull request. Link to relevant GitHub issues, if any.
This PR, paired with ada_feeding#172, allows users to maintain multiple parameter configurations and switch between them.
On the main settings page, the user can choose which preset they want to use. If they want to change any parameters, they must be on a non-default preset.
On any page that allows changing settings (e.g., the BiteTransfer page), the user can change settings for that preset, and can revert settings for that preset to any of the other presets.
Explain how this pull request was tested, including but not limited to the below checkmarks.
[x] Launch the code in mock: python3 src/ada_feeding/start.py --sim mock
[x] In the web app, go to “Settings.” Verify that “default” is the current preset.
[x] In the web app, click “Bite Transfer.” Verify it doesn’t let you do so on the “default” preset.
[x] In the web app, create a new preset called “test1”. Verify that in the share directory (within the install folder of the workspace), ada_feeding_action_servers_custom.yaml shows “test1” under namespace_to_use and custom_namespaces.
[x] In the web app, create a new preset called “test2.” Verify all of the above.
[x] In the web app, switch to preset “default.” Verify it is reflected in the YAML file.
[x] In the web app, click “Bite Transfer.” Verify it doesn’t let you do so.
[x] In the web app, create a new preset called “test3.” Verify all of the above.
[x] In the web app, click “Bite Transfer.” Verify it does let you do so, and it shows “test3” as the preset you’re currently changing.
[x] In the web app, change “distance to mouth” to 5cm. Verify it is reflected in the YAML.
[x] In the web app, go back to the main “Settings” page, change the preset to “test2,” then go into “Bite Transfer.” Verify the distance starts at 2.5cm, and then change the distance to 1cm. Verify it is reflected in the YAML.
[x] In the web app, revert the distance back to each of the presets. For test1 it should go to 2.5, for test3 to 5, and for default to 2.5. Verify each of those are updated in the YAML.
[x] In the web app, set “test2” to 1cm.
[x] Add another preset test4, on the "Bite Transfer" settings page verify that the "set to..." dropdown menu is properly rendered.
[x] Set "test2" to the current preset
[x] Terminate the ada_feeding code, re-launch it, and verify all settings are still saved.
[x] In the web app, leave the Settings menu. Go through until the robot is at the user’s mouth. Verify in RVIZ it is 1cm away.
[x] In the web app, on the BiteDone page (with auto-continue unchecked), go into Settings and change it to “test3.” Then go back to staging and back to MoveToMouth, verify it goes 5cm away.
[x] In the web app, do the same as above but setting it to “default,” verify it goes 2.5cm away.
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.
This PR, paired with
ada_feeding
#172, allows users to maintain multiple parameter configurations and switch between them.Explain how this pull request was tested, including but not limited to the below checkmarks.
Pull this code and
ada_feeding
#172 code and rebuild.python3 src/ada_feeding/start.py --sim mock
install
folder of the workspace),ada_feeding_action_servers_custom.yaml
shows “test1” undernamespace_to_use
andcustom_namespaces
.test4
, on the "Bite Transfer" settings page verify that the "set to..." dropdown menu is properly rendered.ada_feeding
code, re-launch it, and verify all settings are still saved.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
)