From 80353d43c3880e18f6308a2f394d9fa467320bcc Mon Sep 17 00:00:00 2001 From: Amal Nanavati Date: Thu, 12 Dec 2024 13:28:14 -0800 Subject: [PATCH 1/4] Added pre-commit and license --- .codespell-ignore | 1 + .github/LICENSE_HEADER.md | 2 + .github/PULL_REQUEST_TEMPLATE.md | 18 ++-- .github/workflows/node.js.yml | 3 + .github/workflows/pre-commit.yaml | 44 ++++++++++ .pre-commit-config.yaml | 82 +++++++++++++++++++ feeding_web_app_ros2_msgs/README.md | 2 +- .../action/SortByCharacterFrequency.action | 2 +- .../srv/ReverseString.srv | 2 +- feeding_web_app_ros2_test/README.md | 3 + .../feeding_web_app_ros2_test/AcquireFood.py | 3 + .../AcquireFoodClient.py | 3 + .../DummyRealSense.py | 3 + .../FaceDetection.py | 7 +- .../FoodOnForkDetection.py | 7 +- .../MoveAbovePlate.py | 3 + .../MoveFromMouth.py | 3 + .../MoveFromMouthToAbovePlate.py | 3 + .../MoveFromMouthToRestingPosition.py | 3 + .../MoveFromMouthToStagingConfiguration.py | 3 + .../feeding_web_app_ros2_test/MoveToDummy.py | 6 +- .../feeding_web_app_ros2_test/MoveToMouth.py | 3 + .../MoveToRestingPosition.py | 3 + .../MoveToStagingConfiguration.py | 3 + .../MoveToStowLocation.py | 3 + .../SegmentFromPoint.py | 5 +- .../TableDetection.py | 7 +- .../feeding_web_app_ros2_test/__init__.py | 2 + .../feeding_web_app_ros2_test/publisher.py | 3 + .../reverse_string_service.py | 3 + .../sort_by_character_frequency_action.py | 3 + .../feeding_web_app_ros2_test/subscriber.py | 3 + .../feeding_dummy_acquirefood_launch.py | 4 +- .../feeding_web_app_dummy_nodes_launch.xml | 7 +- feeding_web_app_ros2_test/setup.py | 3 + .../test/test_copyright.py | 3 + feeding_web_app_ros2_test/test/test_flake8.py | 3 + feeding_web_app_ros2_test/test/test_pep257.py | 3 + feedingwebapp/.eslintrc.js | 3 + feedingwebapp/Acknowledgements.md | 2 +- feedingwebapp/README.md | 45 ++++++---- feedingwebapp/ResponsivenessTesting.md | 34 ++++---- feedingwebapp/TechDocumentation.md | 6 +- feedingwebapp/public/index.html | 5 ++ .../public/robot_state_imgs/forward.svg | 6 +- .../public/robot_state_imgs/table.svg | 4 +- feedingwebapp/server.js | 5 +- feedingwebapp/src/App.css | 3 + feedingwebapp/src/App.jsx | 3 + feedingwebapp/src/Pages/Constants.js | 3 + feedingwebapp/src/Pages/Footer/Footer.jsx | 3 + feedingwebapp/src/Pages/GlobalState.jsx | 9 +- feedingwebapp/src/Pages/Header/Header.jsx | 3 + feedingwebapp/src/Pages/Header/InfoModal.jsx | 5 +- .../src/Pages/Header/TeleopSubcomponent.jsx | 5 +- .../BiteSelectionButtonOverlay.jsx | 3 + .../BiteSelectionName.jsx | 3 + .../BiteSelectionPointMask.jsx | 3 + .../ImageWithButtonName.jsx | 3 + .../ImageWithButtonOverlay.jsx | 3 + .../ImageWithPointMask.jsx | 3 + feedingwebapp/src/Pages/Home/Button.css | 5 +- feedingwebapp/src/Pages/Home/Home.css | 3 + feedingwebapp/src/Pages/Home/Home.jsx | 7 +- .../Home/MealStates/BiteAcquisitionCheck.jsx | 5 +- .../src/Pages/Home/MealStates/BiteDone.jsx | 5 +- .../Pages/Home/MealStates/BiteSelection.jsx | 9 +- .../Home/MealStates/CircleProgressBar.jsx | 3 + .../Pages/Home/MealStates/DetectingFace.jsx | 3 + .../MealStates/DetectingFaceSubcomponent.jsx | 3 + .../src/Pages/Home/MealStates/PostMeal.jsx | 3 + .../src/Pages/Home/MealStates/PreMeal.jsx | 3 + .../src/Pages/Home/MealStates/RobotMotion.jsx | 7 +- .../src/Pages/Home/MealStates/progressbar.js | 3 + feedingwebapp/src/Pages/Home/VideoFeed.jsx | 3 + .../src/Pages/Settings/AutoContinue.jsx | 3 + .../src/Pages/Settings/BiteTransfer.jsx | 3 + .../Pages/Settings/CustomizeConfiguration.jsx | 3 + feedingwebapp/src/Pages/Settings/Main.jsx | 3 + .../src/Pages/Settings/PlanningScene.jsx | 3 + feedingwebapp/src/Pages/Settings/Settings.jsx | 3 + .../src/Pages/Settings/SettingsPageParent.jsx | 9 +- feedingwebapp/src/buttons/HoldButton.jsx | 3 + feedingwebapp/src/buttons/MaskButton.jsx | 3 + .../src/buttons/ToggleButtonGroup.jsx | 3 + feedingwebapp/src/helpers.js | 3 + feedingwebapp/src/index.css | 3 + feedingwebapp/src/index.js | 3 + feedingwebapp/src/logo.svg | 2 +- feedingwebapp/src/reportWebVitals.js | 3 + feedingwebapp/src/robot/README.md | 2 +- feedingwebapp/src/robot/RobotVideoStreams.jsx | 3 + feedingwebapp/src/robot/VideoStream.jsx | 5 +- feedingwebapp/src/ros/TestROS.jsx | 3 + feedingwebapp/src/ros/TestROSAction.jsx | 3 + feedingwebapp/src/ros/TestROSPublish.jsx | 3 + feedingwebapp/src/ros/TestROSService.jsx | 3 + feedingwebapp/src/ros/TestROSSubscribe.jsx | 3 + feedingwebapp/src/ros/ros_helpers.js | 3 + feedingwebapp/src/setupTests.js | 3 + feedingwebapp/src/webrtc/webrtc_helpers.js | 3 + feedingwebapp/start_robot_browser.js | 3 + 102 files changed, 489 insertions(+), 86 deletions(-) create mode 100644 .codespell-ignore create mode 100644 .github/LICENSE_HEADER.md create mode 100644 .github/workflows/pre-commit.yaml create mode 100644 .pre-commit-config.yaml mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/AcquireFood.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/AcquireFoodClient.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveAbovePlate.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouth.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToAbovePlate.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToRestingPosition.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToStagingConfiguration.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToMouth.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToRestingPosition.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToStagingConfiguration.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToStowLocation.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/SegmentFromPoint.py mode change 100644 => 100755 feeding_web_app_ros2_test/feeding_web_app_ros2_test/sort_by_character_frequency_action.py mode change 100644 => 100755 feedingwebapp/start_robot_browser.js diff --git a/.codespell-ignore b/.codespell-ignore new file mode 100644 index 00000000..cc699cb5 --- /dev/null +++ b/.codespell-ignore @@ -0,0 +1 @@ +fof diff --git a/.github/LICENSE_HEADER.md b/.github/LICENSE_HEADER.md new file mode 100644 index 00000000..95965d38 --- /dev/null +++ b/.github/LICENSE_HEADER.md @@ -0,0 +1,2 @@ +Copyright (c) 2024, Personal Robotics Laboratory +License: BSD 3-Clause. See LICENSE.md file in root directory. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f5bc7284..28a7b03c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,21 +1,21 @@ ## Describe this pull request. Link to relevant GitHub issues, if any. -[TODO] +\[TODO\] ## Explain how this pull request was tested, including but not limited to the below checkmarks. -[TODO] +\[TODO\] -*** +______________________________________________________________________ **Before creating a pull request** -- [ ] Format React code with `npm run format` -- [ ] Format Python code by running `python3 -m black .` in the top-level of this repository -- [ ] Thoroughly test your code's functionality, including unintended uses. -- [ ] Fully test the responsiveness of the feature as documented in the [Responsiveness Testing Guidelines](https://github.com/personalrobotics/feeding_web_interface/blob/main/feedingwebapp/ResponsivenessTesting.md). If you deviate from those guidelines, document above why you deviated and what you did instead. -- [ ] 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. +- \[ \] Format React code with `npm run format` +- \[ \] Format Python code by running `python3 -m black .` in the top-level of this repository +- \[ \] Thoroughly test your code's functionality, including unintended uses. +- \[ \] Fully test the responsiveness of the feature as documented in the [Responsiveness Testing Guidelines](https://github.com/personalrobotics/feeding_web_interface/blob/main/feedingwebapp/ResponsivenessTesting.md). If you deviate from those guidelines, document above why you deviated and what you did instead. +- \[ \] 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`) +- \[ \] Squash all your commits into one (or `Squash and Merge`) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3cf2336e..34a2fc26 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 00000000..d71693b4 --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,44 @@ +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + +name: pre-commit + +on: + push: + branches: + - main + - master + - ros2-devel + pull_request: + workflow_dispatch: + +concurrency: + group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" + cancel-in-progress: true + +env: + PYTHON_VERSION: "3.10" + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + ## Run pre-commit and try to apply fixes + - name: Run pre-commit + uses: pre-commit/action@v3.0.1 + - name: Apply fixes from pre-commit + uses: pre-commit-ci/lite-action@v1.0.2 + if: always() + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install --force-reinstall pylint==3.1.0 + # pip install overrides + # - name: Analysing the code with pylint + # run: | + # pylint --recursive=y --rcfile=.pylintrc . --disable fixme --disable import-error diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..9f9376bd --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,82 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks + - id: check-xml + - id: check-yaml + - id: debug-statements + - id: destroyed-symlinks + - id: detect-private-key + - id: end-of-file-fixer + - id: mixed-line-ending + - id: requirements-txt-fixer + - id: trailing-whitespace + + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.5.0 + hooks: + - id: insert-license + args: + - --license-file + - .github/LICENSE_HEADER.md + - --use-current-year + types_or: [python, yaml] + + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.5.0 + hooks: + - id: insert-license + args: + - --license-file + - .github/LICENSE_HEADER.md + - --use-current-year + - --comment-style + - "" + types_or: [xml, html] + exclude: ".*package\\.xml$|.*\\.xacro$|.*\\.svg$" + + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.5.0 + hooks: + - id: insert-license + args: + - --license-file + - .github/LICENSE_HEADER.md + - --use-current-year + - --comment-style + - "//" + types_or: [javascript, jsx, ts, tsx, css] + + - repo: https://github.com/psf/black + rev: 23.1.0 + hooks: + - id: black + + - repo: https://github.com/lovesegfault/beautysh + rev: v6.2.1 + hooks: + - id: beautysh + + - repo: https://github.com/executablebooks/mdformat + rev: 0.7.16 + hooks: + - id: mdformat + args: + - --number + + - repo: https://github.com/codespell-project/codespell + rev: v2.2.4 + hooks: + - id: codespell + args: + - --ignore-words=.codespell-ignore + exclude: ".*\\.svg$|.*package-lock\\.json$" diff --git a/feeding_web_app_ros2_msgs/README.md b/feeding_web_app_ros2_msgs/README.md index f15d2f7c..0b9c941d 100644 --- a/feeding_web_app_ros2_msgs/README.md +++ b/feeding_web_app_ros2_msgs/README.md @@ -1,3 +1,3 @@ # feeding_web_app_ros2_msgs -This directory contains custom messages used by the nodes in `feeding_web_app_ros2_test` that are **NOT** robot interfaces. Robot interface messages are in [`ada_feeding` (branch: `ros2-devel`)](https://github.com/personalrobotics/ada_feeding/tree/ros2-devel). \ No newline at end of file +This directory contains custom messages used by the nodes in `feeding_web_app_ros2_test` that are **NOT** robot interfaces. Robot interface messages are in [`ada_feeding` (branch: `ros2-devel`)](https://github.com/personalrobotics/ada_feeding/tree/ros2-devel). diff --git a/feeding_web_app_ros2_msgs/action/SortByCharacterFrequency.action b/feeding_web_app_ros2_msgs/action/SortByCharacterFrequency.action index 17f5b815..bfb81d06 100644 --- a/feeding_web_app_ros2_msgs/action/SortByCharacterFrequency.action +++ b/feeding_web_app_ros2_msgs/action/SortByCharacterFrequency.action @@ -2,4 +2,4 @@ string input --- string result --- -float32 progress \ No newline at end of file +float32 progress diff --git a/feeding_web_app_ros2_msgs/srv/ReverseString.srv b/feeding_web_app_ros2_msgs/srv/ReverseString.srv index b71b7930..655a9b73 100644 --- a/feeding_web_app_ros2_msgs/srv/ReverseString.srv +++ b/feeding_web_app_ros2_msgs/srv/ReverseString.srv @@ -1,3 +1,3 @@ string input --- -string reversed \ No newline at end of file +string reversed diff --git a/feeding_web_app_ros2_test/README.md b/feeding_web_app_ros2_test/README.md index 69ab3a5e..c79e73c3 100644 --- a/feeding_web_app_ros2_test/README.md +++ b/feeding_web_app_ros2_test/README.md @@ -11,6 +11,7 @@ See the [`ada_feeding` top-level README for setup instructions](https://github.c To launch the dummy nodes, rosbridge, and web_video_server, run `source install/setup.bash; ros2 launch feeding_web_app_ros2_test feeding_web_app_dummy_nodes_launch.xml`. You can also toggle off certain combinations of dummy nodes with arguments: + - **Don't run motion nodes**: `ros2 launch feeding_web_app_ros2_test feeding_web_app_dummy_nodes_launch.xml run_motion:=false` - **Don't run the face detection node**: `ros2 launch feeding_web_app_ros2_test feeding_web_app_dummy_nodes_launch.xml :run_face_detection=false` - **Don't run the food detection node**: `ros2 launch feeding_web_app_ros2_test feeding_web_app_dummy_nodes_launch.xml :run_food_detection=false` @@ -21,10 +22,12 @@ You can also combine any of the above arguments. ## Simulating an AcquireFood Goal If you launch the code in `--sim mock` (see [here](https://github.com/personalrobotics/ada_feeding/blob/ros2-devel/README.md)), using bite selection through the app should properly call AcquireFood, and you should be able to see the acquisition action in RVIZ (it is recommended to add an `Axes` visualization to RVIZ for the `food` frame to see the perceived top-center and orientation of the detected food item). However, this approach has two downsides: + 1. The detected food mask is a dummy mask, not a real output of SegmentAnything. 2. Each time you use the app to invoke AcquireFood, the mask and depth will be slightly different, which is a challenge for repeatability. To address these issues, we have pickled goal request(s) from the app to the AcquireFood action. These goal request(s) were Segmented by the actual `SegmentFromPoint` node with the dummy RGB and depth images (found in `./data`). To invoke bite acquisition with this static goal request, do the following: + 1. `cd ~/colcon_ws` 2. `python3 src/ada_feeding/start-py --sim mock`. See [here](https://github.com/personalrobotics/ada_feeding/blob/ros2-devel/README.md) for more info. 3. `ros2 launch feeding_web_app_ros2_test feeding_dummy_acquirefood_launch.py`. This will have the robot move above the plate, and then invoke `AcquireFood` for the stored goal request. diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/AcquireFood.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/AcquireFood.py old mode 100644 new mode 100755 index 3ea60faa..e9784465 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/AcquireFood.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/AcquireFood.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.action import AcquireFood from feeding_web_app_ros2_test.MoveToDummy import MoveToDummy import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/AcquireFoodClient.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/AcquireFoodClient.py old mode 100644 new mode 100755 index 137007a5..b606d812 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/AcquireFoodClient.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/AcquireFoodClient.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + # Standard imports import pickle diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/DummyRealSense.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/DummyRealSense.py index a41e4d3c..b07fe409 100755 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/DummyRealSense.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/DummyRealSense.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + # Standard imports import array import threading diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/FaceDetection.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/FaceDetection.py index 506cc6f8..c36ac660 100755 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/FaceDetection.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/FaceDetection.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.msg import FaceDetection from std_srvs.srv import SetBool import cv2 @@ -96,13 +99,13 @@ def toggle_face_detection_callback(self, request, response): self.is_on = True self.is_on_lock.release() response.success = True - response.message = "Succesfully turned face detection on" + response.message = "Successfully turned face detection on" else: self.is_on_lock.acquire() self.is_on = False self.is_on_lock.release() response.success = True - response.message = "Succesfully turned face detection off" + response.message = "Successfully turned face detection off" return response def camera_callback(self, msg): diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/FoodOnForkDetection.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/FoodOnForkDetection.py index e1b12964..4661480c 100755 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/FoodOnForkDetection.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/FoodOnForkDetection.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.msg import FoodOnForkDetection from std_srvs.srv import SetBool import rclpy @@ -78,13 +81,13 @@ def toggle_food_on_fork_detection_callback(self, request, response): self.is_on = True self.is_on_lock.release() response.success = True - response.message = "Succesfully turned food-on-fork detection on" + response.message = "Successfully turned food-on-fork detection on" else: self.is_on_lock.acquire() self.is_on = False self.is_on_lock.release() response.success = True - response.message = "Succesfully turned food-on-fork detection off" + response.message = "Successfully turned food-on-fork detection off" return response def camera_callback(self, msg): diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveAbovePlate.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveAbovePlate.py old mode 100644 new mode 100755 index d778cc11..0fdf23e3 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveAbovePlate.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveAbovePlate.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.action import MoveTo from feeding_web_app_ros2_test.MoveToDummy import MoveToDummy import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouth.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouth.py old mode 100644 new mode 100755 index e7ca36dc..d03b4ebc --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouth.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouth.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.action import MoveTo from feeding_web_app_ros2_test.MoveToDummy import MoveToDummy import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToAbovePlate.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToAbovePlate.py old mode 100644 new mode 100755 index 109107b7..1c7fd008 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToAbovePlate.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToAbovePlate.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.action import MoveTo from feeding_web_app_ros2_test.MoveToDummy import MoveToDummy import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToRestingPosition.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToRestingPosition.py old mode 100644 new mode 100755 index eb0f5e15..d2bbbd17 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToRestingPosition.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToRestingPosition.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.action import MoveTo from feeding_web_app_ros2_test.MoveToDummy import MoveToDummy import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToStagingConfiguration.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToStagingConfiguration.py old mode 100644 new mode 100755 index c061f445..4e1d1176 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToStagingConfiguration.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveFromMouthToStagingConfiguration.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.action import MoveTo from feeding_web_app_ros2_test.MoveToDummy import MoveToDummy import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToDummy.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToDummy.py index 8d69e211..ea533877 100644 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToDummy.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToDummy.py @@ -1,4 +1,6 @@ -#!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + import rclpy from rclpy.action import ActionServer, CancelResponse, GoalResponse from rclpy.node import Node @@ -64,7 +66,7 @@ def goal_callback(self, goal_request): def cancel_callback(self, goal_handle): """ Always accept client requests to cancel the active goal. Note that this - function should not actually impelement the cancel; that is handled in + function should not actually implement the cancel; that is handled in `execute_callback` Parameters diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToMouth.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToMouth.py old mode 100644 new mode 100755 index 4be07041..b894ef52 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToMouth.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToMouth.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.action import MoveToMouth from feeding_web_app_ros2_test.MoveToDummy import MoveToDummy import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToRestingPosition.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToRestingPosition.py old mode 100644 new mode 100755 index c1f3f18c..dfa1d87e --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToRestingPosition.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToRestingPosition.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.action import MoveTo from feeding_web_app_ros2_test.MoveToDummy import MoveToDummy import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToStagingConfiguration.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToStagingConfiguration.py old mode 100644 new mode 100755 index d8deac51..fd926a16 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToStagingConfiguration.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToStagingConfiguration.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.action import MoveTo from feeding_web_app_ros2_test.MoveToDummy import MoveToDummy import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToStowLocation.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToStowLocation.py old mode 100644 new mode 100755 index 9a80c673..fe889989 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToStowLocation.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/MoveToStowLocation.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from ada_feeding_msgs.action import MoveTo from feeding_web_app_ros2_test.MoveToDummy import MoveToDummy import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/SegmentFromPoint.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/SegmentFromPoint.py old mode 100644 new mode 100755 index df431d25..8b0202c0 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/SegmentFromPoint.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/SegmentFromPoint.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + import array from ada_feeding_msgs.action import SegmentFromPoint from ada_feeding_msgs.msg import Mask @@ -164,7 +167,7 @@ def goal_callback(self, goal_request): def cancel_callback(self, goal_handle): """ Always accept client requests to cancel the active goal. Note that this - function should not actually impelement the cancel; that is handled in + function should not actually implement the cancel; that is handled in `execute_callback` Parameters diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/TableDetection.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/TableDetection.py index 38fe6dd1..c9ce805e 100755 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/TableDetection.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/TableDetection.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from builtin_interfaces.msg import Time from geometry_msgs.msg import Pose, PoseStamped, Point, Quaternion from std_srvs.srv import SetBool @@ -66,13 +69,13 @@ def toggle_table_detection_callback(self, request, response): self.is_on = True self.is_on_lock.release() response.success = True - response.message = "Succesfully turned table detection on" + response.message = "Successfully turned table detection on" else: self.is_on_lock.acquire() self.is_on = False self.is_on_lock.release() response.success = True - response.message = "Succesfully turned table detection off" + response.message = "Successfully turned table detection off" return response def camera_callback(self, msg): diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/__init__.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/__init__.py index e69de29b..94cfe0b8 100644 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/__init__.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/publisher.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/publisher.py index 80aa26d8..42d71b78 100755 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/publisher.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/publisher.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + import rclpy from rclpy.node import Node diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/reverse_string_service.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/reverse_string_service.py index 8e8a6af3..569d889e 100755 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/reverse_string_service.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/reverse_string_service.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from feeding_web_app_ros2_msgs.srv import ReverseString import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/sort_by_character_frequency_action.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/sort_by_character_frequency_action.py old mode 100644 new mode 100755 index b5ccee02..e4ff2646 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/sort_by_character_frequency_action.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/sort_by_character_frequency_action.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + import time import rclpy diff --git a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/subscriber.py b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/subscriber.py index 741da66a..0daf49ef 100755 --- a/feeding_web_app_ros2_test/feeding_web_app_ros2_test/subscriber.py +++ b/feeding_web_app_ros2_test/feeding_web_app_ros2_test/subscriber.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + import rclpy from rclpy.node import Node diff --git a/feeding_web_app_ros2_test/launch/feeding_dummy_acquirefood_launch.py b/feeding_web_app_ros2_test/launch/feeding_dummy_acquirefood_launch.py index 1bed76bc..1041eefb 100644 --- a/feeding_web_app_ros2_test/launch/feeding_dummy_acquirefood_launch.py +++ b/feeding_web_app_ros2_test/launch/feeding_dummy_acquirefood_launch.py @@ -1,4 +1,6 @@ -#!/usr/bin/env python3 +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from launch_ros.substitutions import FindPackageShare from launch import LaunchDescription from launch.actions import IncludeLaunchDescription diff --git a/feeding_web_app_ros2_test/launch/feeding_web_app_dummy_nodes_launch.xml b/feeding_web_app_ros2_test/launch/feeding_web_app_dummy_nodes_launch.xml index 79f48ecc..6f7d5328 100644 --- a/feeding_web_app_ros2_test/launch/feeding_web_app_dummy_nodes_launch.xml +++ b/feeding_web_app_ros2_test/launch/feeding_web_app_dummy_nodes_launch.xml @@ -1,3 +1,8 @@ + + @@ -51,7 +56,7 @@ - + diff --git a/feeding_web_app_ros2_test/setup.py b/feeding_web_app_ros2_test/setup.py index b3f03a2b..fa31922c 100644 --- a/feeding_web_app_ros2_test/setup.py +++ b/feeding_web_app_ros2_test/setup.py @@ -1,3 +1,6 @@ +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + from glob import glob import os from setuptools import setup diff --git a/feeding_web_app_ros2_test/test/test_copyright.py b/feeding_web_app_ros2_test/test/test_copyright.py index ceffe896..b15eb480 100644 --- a/feeding_web_app_ros2_test/test/test_copyright.py +++ b/feeding_web_app_ros2_test/test/test_copyright.py @@ -1,3 +1,6 @@ +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + # Copyright 2015 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/feeding_web_app_ros2_test/test/test_flake8.py b/feeding_web_app_ros2_test/test/test_flake8.py index ee79f31a..2bc27938 100644 --- a/feeding_web_app_ros2_test/test/test_flake8.py +++ b/feeding_web_app_ros2_test/test/test_flake8.py @@ -1,3 +1,6 @@ +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + # Copyright 2017 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/feeding_web_app_ros2_test/test/test_pep257.py b/feeding_web_app_ros2_test/test/test_pep257.py index a2c3deb8..ff1f907d 100644 --- a/feeding_web_app_ros2_test/test/test_pep257.py +++ b/feeding_web_app_ros2_test/test/test_pep257.py @@ -1,3 +1,6 @@ +# Copyright (c) 2024, Personal Robotics Laboratory +# License: BSD 3-Clause. See LICENSE.md file in root directory. + # Copyright 2015 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/feedingwebapp/.eslintrc.js b/feedingwebapp/.eslintrc.js index 2fee8df3..c83578e1 100644 --- a/feedingwebapp/.eslintrc.js +++ b/feedingwebapp/.eslintrc.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + module.exports = { root: true, parserOptions: { diff --git a/feedingwebapp/Acknowledgements.md b/feedingwebapp/Acknowledgements.md index 8c5f5c93..435367e1 100644 --- a/feedingwebapp/Acknowledgements.md +++ b/feedingwebapp/Acknowledgements.md @@ -1,3 +1,3 @@ **Acknowledgement for all the icons we used:** -“[Bowl with fruits](https://thenounproject.com/icon/bowl-with-fruits-5039233/)” icon by Langtik, “[Fork](https://thenounproject.com/icon/fork-10962/)” icon by Dmitry Baranovskiy, “[Human head mouth](https://thenounproject.com/icon/open-mouth-2885042/)” icon by Wuppdidu, “[Human head](https://thenounproject.com/icon/head-2288243/)” icon by Wildson Rafalski, “[Strawberry](https://thenounproject.com/icon/strawberry-3487721/)”icon by Ashabul Kahfi, “[Robot arm](https://thenounproject.com/icon/robot-arm-4466147/)” icon by Peter Lakenbrink, “[Lock](https://thenounproject.com/icon/lock-3107451/)” icon by IcoMoon and “[Stop](https://thenounproject.com/icon/stop-34715/)” icon by AS Design from Noun Project CC BY 3.0. \ No newline at end of file +“[Bowl with fruits](https://thenounproject.com/icon/bowl-with-fruits-5039233/)” icon by Langtik, “[Fork](https://thenounproject.com/icon/fork-10962/)” icon by Dmitry Baranovskiy, “[Human head mouth](https://thenounproject.com/icon/open-mouth-2885042/)” icon by Wuppdidu, “[Human head](https://thenounproject.com/icon/head-2288243/)” icon by Wildson Rafalski, “[Strawberry](https://thenounproject.com/icon/strawberry-3487721/)”icon by Ashabul Kahfi, “[Robot arm](https://thenounproject.com/icon/robot-arm-4466147/)” icon by Peter Lakenbrink, “[Lock](https://thenounproject.com/icon/lock-3107451/)” icon by IcoMoon and “[Stop](https://thenounproject.com/icon/stop-34715/)” icon by AS Design from Noun Project CC BY 3.0. diff --git a/feedingwebapp/README.md b/feedingwebapp/README.md index 9d370b4b..bc588bea 100644 --- a/feedingwebapp/README.md +++ b/feedingwebapp/README.md @@ -7,6 +7,7 @@ This directory contains the web app that users use to interact with the robot-as See the [`ada_feeding` top-level README for setup instructions](https://github.com/personalrobotics/ada_feeding/blob/ros2-devel/README.md). ## Overview + The _nominal_ user flow for this web app can be seen below. ![Screenshot 2024-02-14 at 8 23 06 PM](https://github.com/personalrobotics/feeding_web_interface/assets/8277986/d944de8b-6d5a-4839-8d1b-1bc4d6f5db70) @@ -14,39 +15,44 @@ The _nominal_ user flow for this web app can be seen below. - ## Getting Started in Computer ### Installation + 1. Navigate to your ROS2 workspace: `cd {path/to/your/ros2/workspace}` 2. Clone the repo: `git clone git@github.com:personalrobotics/feeding_web_interface.git` using SSH, or `git clone https://github.com/personalrobotics/feeding_web_interface.git` using HTTPS 3. Install the ROS2 packages: `colcon build` 4. Source the directory: `source install/setup.bash` 5. Navigate to the web app folder: `cd feeding_web_interface/feedingwebapp` 6. Install web app dependencies: `npm install --legacy-peer-deps` - 1. You may also have to run `npx playwright install`; you might be prompted to run that after `node start_robot_browser.js` -* Consider checking out the Troubleshooting section if there are errors in this process. -If your workspace has already been built, you should run `source install/setup.bash`. If this is your first time building your workspace, you should `source /opt/ros/humble/setup.bash` and then run `colcon build` followed by `source install/setup.bash`. For both of the above cases, you must be in the main directory of your workspace (e.g., `src` should be a subfolder). + 1. You may also have to run `npx playwright install`; you might be prompted to run that after `node start_robot_browser.js` + +- Consider checking out the Troubleshooting section if there are errors in this process. + If your workspace has already been built, you should run `source install/setup.bash`. If this is your first time building your workspace, you should `source /opt/ros/humble/setup.bash` and then run `colcon build` followed by `source install/setup.bash`. For both of the above cases, you must be in the main directory of your workspace (e.g., `src` should be a subfolder). ### Usage (Web App) + 1. Navigate to the web app folder: `cd {path/to/feeding_web_interface}/feedingwebapp` 2. Make any desired changes to environment variables in `.env` - - If you're not running the robot code alongside the app, set `REACT_APP_DEBUG=true` in `.env` to be able to move past screens where the app is waiting on the robot. The default is `REACT_APP_DEBUG=false`. - - If users will be accessing the app on a device other than the device running ROS, change `REACT_APP_ROS_SERVER_HOSTNAME` in `.env` to be the hostname of the device running ROS. Ensure that device is configured so that ports 8080 (web_video_server default) and 9090 (rosbridge default) can be accessed. + - If you're not running the robot code alongside the app, set `REACT_APP_DEBUG=true` in `.env` to be able to move past screens where the app is waiting on the robot. The default is `REACT_APP_DEBUG=false`. + - If users will be accessing the app on a device other than the device running ROS, change `REACT_APP_ROS_SERVER_HOSTNAME` in `.env` to be the hostname of the device running ROS. Ensure that device is configured so that ports 8080 (web_video_server default) and 9090 (rosbridge default) can be accessed. 3. Start the app: `npm start` -4. Start the WebRTC signalling server: `pm2 start server.js` (see [here](https://pm2.keymetrics.io/docs/usage/quick-start/) for `pm2`` instructions) +4. Start the WebRTC signalling server: `pm2 start server.js` (see [here](https://pm2.keymetrics.io/docs/usage/quick-start/) for \`pm2\`\` instructions) 5. Start the headless robot browser: `node start_robot_browser.js` 6. Use a web browser to navigate to `localhost:3000` to see the application. #### Launching Dummy Nodes + This repository includes several dummy nodes that match the interface that the robot nodes will use. By running the dummy nodes alongside the app, we can test the app's communication with the robot even without actual robot code running. 1. Navigate to your ROS2 workspace: `cd {path/to/your/ros2/workspace}` 2. Build your workspace: `colcon build` 3. Launch the dummy nodes, rosbridge, and web_video_server: `source install/setup.bash; ros2 launch feeding_web_app_ros2_test feeding_web_app_dummy_nodes_launch.xml` - 1. To not run the motion, face detection, food detection, or RealSense dummy nodes, add `run_motion:=false`, `run_face_detection:=false`, `run_food_detection:=false`, and/or `run_real_sense:=false` to the end of the above command. + 1. To not run the motion, face detection, food detection, or RealSense dummy nodes, add `run_motion:=false`, `run_face_detection:=false`, `run_food_detection:=false`, and/or `run_real_sense:=false` to the end of the above command. 4. In another terminal, navigate to the web app folder: `cd {path/to/feeding_web_interface}/feedingwebapp` 5. Start the app: `npm start` 6. Use a web browser to navigate to `localhost:3000`. If serving the app on a different device (e.g., an EC2 instance, using ngork, etc.) navigate to `{url_of_device_serving_the_app}:3000`. See "Getting Started in Smartphone" below for more details. @@ -54,7 +60,9 @@ This repository includes several dummy nodes that match the interface that the r You should now see that the web browser is connected to ROS. Further, you should see that when the `MoveAbovePlate` page starts, it should call the action (exactly once), and render feedback. "Pause" should cancel the action, and "Resume" should re-call it. Refreshing the page should cancel the action. When the action returns success, the app should automatically transition to the next page. ### Usage (Test ROS) + There is a special page in the app intended for developers to: (a) test that their setup of the app and ROS2 enables the two to communicate as expected; and (b) gain familiarity with the library of ROS helper functions we use in the web app (see [TechDocumentation.md](https://github.com/personalrobotics/feeding_web_interface/tree/main/feedingwebapp/TechDocumentation.md)). Below are instructions to use this page: + 1. Navigate to your ROS2 workspace: `cd {path/to/your/ros2/workspace}` 2. Build your workspace: `colcon build` 3. Source your workspace: `source install/setup.bash` @@ -64,6 +72,7 @@ There is a special page in the app intended for developers to: (a) test that the 7. Use a web browser to navigate to `localhost:3000/test_ros`. The following are checks to ensure the app is interacting with ROS as expected. If any of them fails, you'll have to do additional troubleshooting to get the web app and ROS2 smoothly communicating with each other. + 1. First, check if the page says `Connected` at the top of the screen. If not, the web app is not communicating with ROS2. 2. Then, use the web app to create a topic, in a terminal window run `ros2 topic echo /{topic_name}`, and then use the web app to publish a message on that topic. Ensure the message is echo-ed in your terminal. 3. Then, use the web app to set a topic to subscribe to, and in a terminal window run `ros2 topic pub /{topic_name} std_msgs/String "{data: \"your_message_here\"}" -1`. The message should render on web app. @@ -72,16 +81,18 @@ The following are checks to ensure the app is interacting with ROS as expected. ## Getting Started in Smartphone -### When your phone and a computer both are connected to the same network of PRL -1. Connect your phone to the same wifi network in the PRL lab that the computer is connected to (e.g., ADA_5G which is used by lab computers like weebo, tobi, ed209). +### When your phone and a computer both are connected to the same network of PRL + +1. Connect your phone to the same wifi network in the PRL lab that the computer is connected to (e.g., ADA_5G which is used by lab computers like weebo, tobi, ed209). 2. Run the app in the computer following the above "Getting Started in Computer" instructions. When the app is running in the computer, copy the port number from the app tab's browser and include it after the computer’s IP address followed by a colon (something like `192.xxx.x.x:3000`). The IP addresses of the computers in the PRL lab can be found [here](https://github.com/personalrobotics/pr_docs/wiki/Networking-and-SSH-Information). Depending on which computer is launching the app, use that computer’s IP address in the URL. -3. Then go to that address from the browser in your phone. Then, the app should be running on your phone too. +3. Then go to that address from the browser in your phone. Then, the app should be running on your phone too. ### When your phone and a computer are connected to two different networks (only one or neither connected to PRL network) -1. Run the app in the computer following the above "Getting Started in Computer" instructions. + +1. Run the app in the computer following the above "Getting Started in Computer" instructions. 2. When the app is running in the computer, open another terminal in the computer and install the ngrok agent following [this tutorial](https://ngrok.com/docs/getting-started/#step-2-install-the-ngrok-agent). 3. Then, follow [this tutorial](https://ngrok.com/docs/getting-started/#step-3-connect-your-agent-to-your-ngrok-account) to connect your agent to your ngrok account. Basically, run this command `ngrok config add-authtoken TOKEN` in the terminal with `TOKEN` replaced by the authtoken from your ngrok account. -4. Now, start ngrok by running this command `ngrok http 3000` in the terminal where `3000` is the port number for the app running on the computer with the localhost. +4. Now, start ngrok by running this command `ngrok http 3000` in the terminal where `3000` is the port number for the app running on the computer with the localhost. 5. Get part of the Forwarding URL from the console UI shown in your terminal that is before the arrow sign as marked in the image below. Then, run it from your phone browser. You should now see the app ruuning on the phone. For more details on this, follow [this tutorial](https://ngrok.com/docs/getting-started/#step-4-start-ngrok). ![image below](./img/image.png) 6. That URL can be accessed by anyone in the world. You can stop the ngrok agent with `ctrl+c`. @@ -92,11 +103,14 @@ The following are checks to ensure the app is interacting with ROS as expected. All tasks should be tracked and documented as [Github Issues](https://github.com/personalrobotics/feeding_web_interface/issues). ### Adding Dependencies + Note that we use `npm`, not `yarn`, to manage dependencies for this project. + - Dependencies added with `npm install ...` should automatically be added when you add `package.json` and `package-lock.json` to your branch. - Additional dependencies should be documented in this readme. ### Writing Code + - Generally, only work on code if there is a corresponding [Github Issue](https://github.com/personalrobotics/feeding_web_interface/issues) for it. - Every feature should be on its own branch, and generally only one person should be pushing to one branch. - Follow the below style guides: @@ -114,5 +128,6 @@ Note that we use `npm`, not `yarn`, to manage dependencies for this project. - Squash all commits on your branch before merging into `main` to ensure a straightforward commit history. ## Troubleshooting -* While installing, if you run into an error about `PUPPETEER`, the fix is to just follow the instructions provided in console and to actually disable it. -* If you get an error says `--env-file` is a bad option, you have to update your `node` verion. + +- While installing, if you run into an error about `PUPPETEER`, the fix is to just follow the instructions provided in console and to actually disable it. +- If you get an error says `--env-file` is a bad option, you have to update your `node` version. diff --git a/feedingwebapp/ResponsivenessTesting.md b/feedingwebapp/ResponsivenessTesting.md index 2646a4c2..0f517548 100644 --- a/feedingwebapp/ResponsivenessTesting.md +++ b/feedingwebapp/ResponsivenessTesting.md @@ -1,32 +1,30 @@ -# Methodology for Testing Responsiveness +# Methodology for Testing Responsiveness After developing an app feature, make sure to test it on the following setups. Total 4 devices as listed below. -- **Smartphone:** iPhone 14 Plus [Tyler]; Width: 428 & Height: 926 - - Landscape - - Portrait -- **Tablet:** iPad Pro (6th gen 12.9") [Tyler]; Width: 1024 & Height: 1366 - - Landscape - - Portrait + +- **Smartphone:** iPhone 14 Plus \[Tyler\]; Width: 428 & Height: 926 + - Landscape + - Portrait +- **Tablet:** iPad Pro (6th gen 12.9") \[Tyler\]; Width: 1024 & Height: 1366 + - Landscape + - Portrait - **External Monitor:** Width: 4096 & Height: 2304 - **Laptop:** Width: 2560 & Height: 1600 - - Full-screen - - Half-screen (vertical split) - - Quarter screen + - Full-screen + - Half-screen (vertical split) + - Quarter screen -For the smartphone and laptops, test on Chrome, Firefox, Edge, and Safari. For the tablet and monitor, pick one browser to test it on. +For the smartphone and laptops, test on Chrome, Firefox, Edge, and Safari. For the tablet and monitor, pick one browser to test it on. -In total, you will run 23 tests (4 browsers * 1 smartphone * 2 orientations + 1 tablet * 2 orientations + 4 browsers * 3 laptops + 1 monitor). +In total, you will run 23 tests (4 browsers * 1 smartphone * 2 orientations + 1 tablet * 2 orientations + 4 browsers * 3 laptops + 1 monitor). -In portrait, pages should have their content appear on one screen and not require scrolling. In landscape, scrolling may be unavoidable for some screens, but try to rearrange the content horizontally in order to minimize required scrolling. +In portrait, pages should have their content appear on one screen and not require scrolling. In landscape, scrolling may be unavoidable for some screens, but try to rearrange the content horizontally in order to minimize required scrolling. -If you don’t have the listed devices available for testing, please “Add custom device” in your browser’s responsive design mode using the width and height of the specific device’s resolution below. Please find the appropriate link from below for each browser's documentation on how to do this *except* Safari: +If you don’t have the listed devices available for testing, please “Add custom device” in your browser’s responsive design mode using the width and height of the specific device’s resolution below. Please find the appropriate link from below for each browser's documentation on how to do this *except* Safari: 1. https://www.ios-resolution.com/ 2. https://support.apple.com/kb/SP748?locale=en_US 3. Adding custom device in Chrome: https://developer.chrome.com/blog/add-a-new-custom-device-as-a-preset/ 4. Adding custom device in Edge: https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/device-mode/ 5. Adding custom device in Firefox: -https://firefox-source-docs.mozilla.org/devtools-user/responsive_design_mode/#creating-custom-devices - - - + https://firefox-source-docs.mozilla.org/devtools-user/responsive_design_mode/#creating-custom-devices diff --git a/feedingwebapp/TechDocumentation.md b/feedingwebapp/TechDocumentation.md index acdfb374..b3b4890b 100644 --- a/feedingwebapp/TechDocumentation.md +++ b/feedingwebapp/TechDocumentation.md @@ -6,9 +6,10 @@ **Global State**: Global state are the variables that we need to keep track of across components and page refreshes. This includes what page the app is on (see FAQ below), what stage of the meal the user/robot are currently on, and any settings. All variables in global state should be defined in [`GlobalState.jsx`](https://github.com/personalrobotics/feeding_web_interface/tree/main/feedingwebapp/src/Pages/GlobalState.jsx), along with their setter functions. Internally, we use [`zustland`](https://github.com/pmndrs/zustand) for global state, which in turn uses cookies to store the state. Therefore, the state will persist across page refreshes, even after clearing the cache. The only way to reset global state is by clearing cookies. -## ROS <--> App Interface +## ROS \<--> App Interface All functions to interact with ROS are defined in [`ros_helpers.jsx`](https://github.com/personalrobotics/feeding_web_interface/tree/main/feedingwebapp/src/ros/ros_helpers.jsx). We followed the following guiding principles when making it: + - No other piece of code should need to import `roslib`; all functions that use ROSLIB should be in `ros_helpers.jsx`. - No other piece of code should need to import `react-ros`. The only exception to that is [`App.jsx`](https://github.com/personalrobotics/feeding_web_interface/tree/main/feedingwebapp/src/App.jsx) which needs to wrap elements that use ROS in the ROS tag. - Only `connectToROS()` should call `useROS()`, while other functions should have the `ros` object passed in. This is because hooks can only be used in React components (e.g., not callback functions). So the general idea is that a component that uses ROS will call `let { isConnected, ros } = connectToROS()` within the main code for the component, and will pass `ros` to any subsequent `ros_helpers.jsx` function calls it makes. @@ -24,10 +25,11 @@ Although the web app's settings menu seem parameter-esque it is not a good idea React, by default, will re-render a component any time local state changes. In other words, it will re-run all code in the function that defines that component. However, this doesn't work well for ROS Services, Actions, etc. because: (a) we don't want to keep re-calling the service/action each time the UI re-renders; and (b) we don't want to keep re-creating a service/action client each time the UI re-renders. Therefore, it is crucial to use React Hooks intentionally and to double and triple check that the service/action is only getting once, to avoid bugs. These resources that can help you understand React Hooks in general: + - https://medium.com/@guptagaruda/react-hooks-understanding-component-re-renders-9708ddee9928 - https://stackoverflow.com/a/69264685 ## Frequently Asked Questions (FAQ) Q: Why are we using global state as opposed to a [`Router`](https://www.w3schools.com/react/react_router.asp) to decide which app components to render? -A: If we use a router, each component will have its own URL. That means that by using the "back" button or navigating through the history in their browser, users can reach any screen of the app, even if it doesn't align with the current state of the robot. Since the app's current screen has to be tightly coupled with the state of the robot, we use global state to decide which component to render, as opposed to giving users free reign to jump to any screen of the app by modifying the URL. \ No newline at end of file +A: If we use a router, each component will have its own URL. That means that by using the "back" button or navigating through the history in their browser, users can reach any screen of the app, even if it doesn't align with the current state of the robot. Since the app's current screen has to be tightly coupled with the state of the robot, we use global state to decide which component to render, as opposed to giving users free reign to jump to any screen of the app by modifying the URL. diff --git a/feedingwebapp/public/index.html b/feedingwebapp/public/index.html index aa069f27..8b7fd14a 100644 --- a/feedingwebapp/public/index.html +++ b/feedingwebapp/public/index.html @@ -1,3 +1,8 @@ + + diff --git a/feedingwebapp/public/robot_state_imgs/forward.svg b/feedingwebapp/public/robot_state_imgs/forward.svg index a028f7b6..c7bf6e03 100644 --- a/feedingwebapp/public/robot_state_imgs/forward.svg +++ b/feedingwebapp/public/robot_state_imgs/forward.svg @@ -1,9 +1,9 @@ - - + - \ No newline at end of file + diff --git a/feedingwebapp/public/robot_state_imgs/table.svg b/feedingwebapp/public/robot_state_imgs/table.svg index c9818f40..f531951d 100644 --- a/feedingwebapp/public/robot_state_imgs/table.svg +++ b/feedingwebapp/public/robot_state_imgs/table.svg @@ -1,6 +1,6 @@ - - \ No newline at end of file + diff --git a/feedingwebapp/server.js b/feedingwebapp/server.js index cec47843..a504b2d3 100644 --- a/feedingwebapp/server.js +++ b/feedingwebapp/server.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + /** * Adapted from https://github.com/coding-with-chaim/webrtc-one-to-many/tree/master * @@ -17,7 +20,7 @@ const webrtc = require('wrtc') let senderStream = {} // key: topic, value: MediaStream // NOTE: There is something wrong with the IPs being passed in being -// all or mostly the same. As a result, in essense this only allows +// all or mostly the same. As a result, in essence this only allows // one publisher or subscriber at a time. let publishPeers = {} // key: IP4:topic, value: RTCPeerConnection let subscribePeers = {} // key: IP4:topic, value: RTCPeerConnection diff --git a/feedingwebapp/src/App.css b/feedingwebapp/src/App.css index 9cd757e6..8898daad 100644 --- a/feedingwebapp/src/App.css +++ b/feedingwebapp/src/App.css @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + .App { text-align: center; } diff --git a/feedingwebapp/src/App.jsx b/feedingwebapp/src/App.jsx index 83ba419b..1ee00448 100644 --- a/feedingwebapp/src/App.jsx +++ b/feedingwebapp/src/App.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import './App.css' import 'bootstrap/dist/css/bootstrap.min.css' diff --git a/feedingwebapp/src/Pages/Constants.js b/feedingwebapp/src/Pages/Constants.js index 5a22897b..98e28f23 100644 --- a/feedingwebapp/src/Pages/Constants.js +++ b/feedingwebapp/src/Pages/Constants.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + import { MEAL_STATE } from './GlobalState' // How often to check if ROS is connected diff --git a/feedingwebapp/src/Pages/Footer/Footer.jsx b/feedingwebapp/src/Pages/Footer/Footer.jsx index c80eeb0a..8be5a3f0 100644 --- a/feedingwebapp/src/Pages/Footer/Footer.jsx +++ b/feedingwebapp/src/Pages/Footer/Footer.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback } from 'react' import { MDBFooter } from 'mdb-react-ui-kit' diff --git a/feedingwebapp/src/Pages/GlobalState.jsx b/feedingwebapp/src/Pages/GlobalState.jsx index c6bebc8c..fd8e417c 100644 --- a/feedingwebapp/src/Pages/GlobalState.jsx +++ b/feedingwebapp/src/Pages/GlobalState.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + /** * zustand is a state management system for React apps. It lets us manage global * state, i.e., state that persists beyond individual pages of the app. In @@ -20,8 +23,8 @@ export const APP_PAGE = { /** * MEAL_STATE stores the current state of the meal, and configures the - * functionality of APP_PAGE.Home. States pre-pended with "U_" are waiting - * for user input whereas states pre-pended with "R_" are waiting for the + * functionality of APP_PAGE.Home. States prepended with "U_" are waiting + * for user input whereas states prepended with "R_" are waiting for the * robot to finish moving. The states are: * - U_PreMeal: Waiting for the user to click "Start Feeding." * - R_MovingAbovePlate: Waiting for the robot to move above the plate. @@ -31,7 +34,7 @@ export const APP_PAGE = { * - R_MovingToRestingPosition: Waiting for the robot to move to resting * position. * - U_BiteAcquisitionCheck: Waiting for the user to specify whether the - * bite acquisition was succesful or not. + * bite acquisition was successful or not. * - R_MovingToStagingConfiguration: Waiting for the robot to move to the * staging configuration. * - R_DetectingFace: Waiting for the robot to detect a face. diff --git a/feedingwebapp/src/Pages/Header/Header.jsx b/feedingwebapp/src/Pages/Header/Header.jsx index 2de66cfc..af0f41c9 100644 --- a/feedingwebapp/src/Pages/Header/Header.jsx +++ b/feedingwebapp/src/Pages/Header/Header.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useEffect, useState } from 'react' import PropTypes from 'prop-types' diff --git a/feedingwebapp/src/Pages/Header/InfoModal.jsx b/feedingwebapp/src/Pages/Header/InfoModal.jsx index f23a1e21..b1cf092a 100644 --- a/feedingwebapp/src/Pages/Header/InfoModal.jsx +++ b/feedingwebapp/src/Pages/Header/InfoModal.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useMemo, useState } from 'react' import { useMediaQuery } from 'react-responsive' @@ -27,7 +30,7 @@ function InfoModal(props) { const inNonMovingState = useGlobalState((state) => state.inNonMovingState) const teleopCallback = useCallback(() => { /** - * TODO: We need a more dynamic way to determing if the app is in a non-moving + * TODO: We need a more dynamic way to determine if the app is in a non-moving * state, i.e., if robot motion is in error or if auto-continue is not going * to get triggered or such. */ diff --git a/feedingwebapp/src/Pages/Header/TeleopSubcomponent.jsx b/feedingwebapp/src/Pages/Header/TeleopSubcomponent.jsx index 32c5f577..a75078ca 100644 --- a/feedingwebapp/src/Pages/Header/TeleopSubcomponent.jsx +++ b/feedingwebapp/src/Pages/Header/TeleopSubcomponent.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import Button from 'react-bootstrap/Button' @@ -795,7 +798,7 @@ const TeleopSubcomponent = (props) => { ) } TeleopSubcomponent.propTypes = { - // A reference to a function to be called if StopServo is succesfully run. + // A reference to a function to be called if StopServo is successfully run. unmountCallback: PropTypes.object, // A function to be called when one of the teleop buttons are released teleopButtonOnReleaseCallback: PropTypes.func, diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionButtonOverlay.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionButtonOverlay.jsx index 47df4d3b..0d36069c 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionButtonOverlay.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionButtonOverlay.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React from 'react' import Button from 'react-bootstrap/Button' diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionName.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionName.jsx index 8d6c6bca..c0969a83 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionName.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionName.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React from 'react' import Button from 'react-bootstrap/Button' diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionPointMask.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionPointMask.jsx index 6dd7d572..82ba414f 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionPointMask.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionPointMask.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React from 'react' import Button from 'react-bootstrap/Button' diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonName.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonName.jsx index 5d29ae3a..57588b9a 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonName.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonName.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React from 'react' import PropTypes from 'prop-types' diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonOverlay.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonOverlay.jsx index 3d173f11..c70e915c 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonOverlay.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonOverlay.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React from 'react' import Button from 'react-bootstrap/Button' diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithPointMask.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithPointMask.jsx index 4845e5c8..d3102db3 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithPointMask.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithPointMask.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React, { useState } from 'react' import Button from 'react-bootstrap/Button' diff --git a/feedingwebapp/src/Pages/Home/Button.css b/feedingwebapp/src/Pages/Home/Button.css index f2e53d43..3dd631c2 100644 --- a/feedingwebapp/src/Pages/Home/Button.css +++ b/feedingwebapp/src/Pages/Home/Button.css @@ -1,4 +1,7 @@ -/* There is a known bug in Firefox where the buttons in this class don't +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + +/* There is a known bug in Firefox where the buttons in this class don't change styles when clicked. Must be addressed before incorporating one of these mock-ups into the actual app. */ .RectButtonsOnImg:hover { diff --git a/feedingwebapp/src/Pages/Home/Home.css b/feedingwebapp/src/Pages/Home/Home.css index fd920f95..4fd8d1aa 100644 --- a/feedingwebapp/src/Pages/Home/Home.css +++ b/feedingwebapp/src/Pages/Home/Home.css @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + .Resizer { background: #000; opacity: 0.2; diff --git a/feedingwebapp/src/Pages/Home/Home.jsx b/feedingwebapp/src/Pages/Home/Home.jsx index ca6dc219..b63d4e73 100644 --- a/feedingwebapp/src/Pages/Home/Home.jsx +++ b/feedingwebapp/src/Pages/Home/Home.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useEffect, useMemo, useRef } from 'react' import PropTypes from 'prop-types' @@ -28,7 +31,7 @@ import { * needed, and communicates with the robot. * * @param {boolean} debug - whether to run it in debug mode (e.g., if you aren't - * simulatenously running the robot) or not + * simultaneously running the robot) or not * @returns {JSX.Element} */ function Home(props) { @@ -329,7 +332,7 @@ function Home(props) { } Home.propTypes = { /** - * Whether to run it in debug mode (e.g., if you aren't simulatenously running + * Whether to run it in debug mode (e.g., if you aren't simultaneously running * the robot) or not */ debug: PropTypes.bool, diff --git a/feedingwebapp/src/Pages/Home/MealStates/BiteAcquisitionCheck.jsx b/feedingwebapp/src/Pages/Home/MealStates/BiteAcquisitionCheck.jsx index ab01cf43..57044673 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/BiteAcquisitionCheck.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/BiteAcquisitionCheck.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React, { useCallback, useEffect, useState, useRef } from 'react' import Button from 'react-bootstrap/Button' @@ -18,7 +21,7 @@ import { FOOD_ON_FORK_DETECTION_TOPIC, FOOD_ON_FORK_DETECTION_TOPIC_MSG, ROS_SER * acquire a bite, and asks the user whether it succeeded at acquiring the bite. */ const BiteAcquisitionCheck = (props) => { - // Store the remining time before auto-continuing + // Store the remaining time before auto-continuing const [remainingSeconds, setRemainingSeconds] = useState(null) // Get the relevant global variables const prevMealState = useGlobalState((state) => state.prevMealState) diff --git a/feedingwebapp/src/Pages/Home/MealStates/BiteDone.jsx b/feedingwebapp/src/Pages/Home/MealStates/BiteDone.jsx index 8db99105..43f5f012 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/BiteDone.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/BiteDone.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React, { useCallback, useEffect, useRef, useState } from 'react' import Button from 'react-bootstrap/Button' @@ -16,7 +19,7 @@ import { FOOD_ON_FORK_DETECTION_TOPIC, FOOD_ON_FORK_DETECTION_TOPIC_MSG, ROS_SER * moving back to above plate. */ const BiteDone = () => { - // Store the remining time before auto-continuing + // Store the remaining time before auto-continuing const [remainingSeconds, setRemainingSeconds] = useState(null) // Get the relevant global variables const setMealState = useGlobalState((state) => state.setMealState) diff --git a/feedingwebapp/src/Pages/Home/MealStates/BiteSelection.jsx b/feedingwebapp/src/Pages/Home/MealStates/BiteSelection.jsx index c9514305..84ca3ac4 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/BiteSelection.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/BiteSelection.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import Button from 'react-bootstrap/Button' @@ -38,7 +41,7 @@ import VideoFeed from '../VideoFeed' * plate. It enables users to select their desired food item. * * @param {boolean} debug - whether to run it in debug mode (e.g., if you aren't - * simulatenously running the robot) or not + * simultaneously running the robot) or not */ const BiteSelection = (props) => { // Get the relevant global variables @@ -337,7 +340,7 @@ const BiteSelection = (props) => { /** * Determine how much to scale the masks so that the largest mask fits - * into the alloted space. + * into the allotted space. */ // Get the size of the largest mask let [maxWidth, maxHeight] = [0, 0] @@ -633,7 +636,7 @@ const BiteSelection = (props) => { } BiteSelection.propTypes = { /** - * Whether to run it in debug mode (e.g., if you aren't simulatenously running + * Whether to run it in debug mode (e.g., if you aren't simultaneously running * the robot) or not */ debug: PropTypes.bool.isRequired, diff --git a/feedingwebapp/src/Pages/Home/MealStates/CircleProgressBar.jsx b/feedingwebapp/src/Pages/Home/MealStates/CircleProgressBar.jsx index 3644ee1c..9489376a 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/CircleProgressBar.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/CircleProgressBar.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // Import circle progress bar from progress bar package import { Circle } from './progressbar.js' // React imports diff --git a/feedingwebapp/src/Pages/Home/MealStates/DetectingFace.jsx b/feedingwebapp/src/Pages/Home/MealStates/DetectingFace.jsx index 01267df3..8330b16d 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/DetectingFace.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/DetectingFace.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React, { useCallback, useEffect, useState } from 'react' // PropTypes is used to validate that the used props are in fact passed to this diff --git a/feedingwebapp/src/Pages/Home/MealStates/DetectingFaceSubcomponent.jsx b/feedingwebapp/src/Pages/Home/MealStates/DetectingFaceSubcomponent.jsx index 8af6052b..8382cd0c 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/DetectingFaceSubcomponent.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/DetectingFaceSubcomponent.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React, { useCallback, useEffect, useRef, useState } from 'react' import PropTypes from 'prop-types' diff --git a/feedingwebapp/src/Pages/Home/MealStates/PostMeal.jsx b/feedingwebapp/src/Pages/Home/MealStates/PostMeal.jsx index e5ebf54d..7f685a82 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/PostMeal.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/PostMeal.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React, { useCallback } from 'react' import Button from 'react-bootstrap/Button' diff --git a/feedingwebapp/src/Pages/Home/MealStates/PreMeal.jsx b/feedingwebapp/src/Pages/Home/MealStates/PreMeal.jsx index c8197c8a..cb3096be 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/PreMeal.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/PreMeal.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React, { useCallback } from 'react' import Button from 'react-bootstrap/Button' diff --git a/feedingwebapp/src/Pages/Home/MealStates/RobotMotion.jsx b/feedingwebapp/src/Pages/Home/MealStates/RobotMotion.jsx index 9954b7a7..c58770c7 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/RobotMotion.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/RobotMotion.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useMediaQuery } from 'react-responsive' @@ -38,7 +41,7 @@ import { * action is completed. * * @param {boolean} debug - whether to run it in debug mode (e.g., if you aren't - * simulatenously running the robot) or not + * simultaneously running the robot) or not * @param {string} mealState - the meal state corresponding with the motion the * robot is executing * @param {string} nextMealState - the meal state to transition to once the @@ -476,7 +479,7 @@ const RobotMotion = (props) => { RobotMotion.propTypes = { /** - * Whether to run it in debug mode (e.g., if you aren't simulatenously running + * Whether to run it in debug mode (e.g., if you aren't simultaneously running * the robot) or not */ debug: PropTypes.bool.isRequired, diff --git a/feedingwebapp/src/Pages/Home/MealStates/progressbar.js b/feedingwebapp/src/Pages/Home/MealStates/progressbar.js index b600b5f8..c17dcb62 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/progressbar.js +++ b/feedingwebapp/src/Pages/Home/MealStates/progressbar.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // ProgressBar.js 1.1.0 // https://kimmobrunfeldt.github.io/progressbar.js // License: MIT diff --git a/feedingwebapp/src/Pages/Home/VideoFeed.jsx b/feedingwebapp/src/Pages/Home/VideoFeed.jsx index 1a87cba9..b0a686ce 100644 --- a/feedingwebapp/src/Pages/Home/VideoFeed.jsx +++ b/feedingwebapp/src/Pages/Home/VideoFeed.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React Imports import React, { useCallback, useEffect, useRef, useState } from 'react' import { useMediaQuery } from 'react-responsive' diff --git a/feedingwebapp/src/Pages/Settings/AutoContinue.jsx b/feedingwebapp/src/Pages/Settings/AutoContinue.jsx index 6e582583..655467d1 100644 --- a/feedingwebapp/src/Pages/Settings/AutoContinue.jsx +++ b/feedingwebapp/src/Pages/Settings/AutoContinue.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useMemo, useState } from 'react' import { View } from 'react-native' diff --git a/feedingwebapp/src/Pages/Settings/BiteTransfer.jsx b/feedingwebapp/src/Pages/Settings/BiteTransfer.jsx index b14c5347..7c71960b 100644 --- a/feedingwebapp/src/Pages/Settings/BiteTransfer.jsx +++ b/feedingwebapp/src/Pages/Settings/BiteTransfer.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useMediaQuery } from 'react-responsive' diff --git a/feedingwebapp/src/Pages/Settings/CustomizeConfiguration.jsx b/feedingwebapp/src/Pages/Settings/CustomizeConfiguration.jsx index 600de3aa..c7e0e5b6 100644 --- a/feedingwebapp/src/Pages/Settings/CustomizeConfiguration.jsx +++ b/feedingwebapp/src/Pages/Settings/CustomizeConfiguration.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useMediaQuery } from 'react-responsive' diff --git a/feedingwebapp/src/Pages/Settings/Main.jsx b/feedingwebapp/src/Pages/Settings/Main.jsx index 1a515ae8..4a7ff399 100644 --- a/feedingwebapp/src/Pages/Settings/Main.jsx +++ b/feedingwebapp/src/Pages/Settings/Main.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useEffect, useRef, useState } from 'react' import Button from 'react-bootstrap/Button' diff --git a/feedingwebapp/src/Pages/Settings/PlanningScene.jsx b/feedingwebapp/src/Pages/Settings/PlanningScene.jsx index 5e458e7a..439334bb 100644 --- a/feedingwebapp/src/Pages/Settings/PlanningScene.jsx +++ b/feedingwebapp/src/Pages/Settings/PlanningScene.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import ButtonGroup from 'react-bootstrap/ButtonGroup' diff --git a/feedingwebapp/src/Pages/Settings/Settings.jsx b/feedingwebapp/src/Pages/Settings/Settings.jsx index 69fdf1ca..8fdfd587 100644 --- a/feedingwebapp/src/Pages/Settings/Settings.jsx +++ b/feedingwebapp/src/Pages/Settings/Settings.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useMemo } from 'react' import PropTypes from 'prop-types' diff --git a/feedingwebapp/src/Pages/Settings/SettingsPageParent.jsx b/feedingwebapp/src/Pages/Settings/SettingsPageParent.jsx index 7a217d11..aac9c692 100644 --- a/feedingwebapp/src/Pages/Settings/SettingsPageParent.jsx +++ b/feedingwebapp/src/Pages/Settings/SettingsPageParent.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useEffect, useRef } from 'react' import { useMediaQuery } from 'react-responsive' @@ -71,7 +74,7 @@ const SettingsPageParent = (props) => { ) /** - * Get the paramater values in the specified namespace or, if they don't exist, + * Get the parameter values in the specified namespace or, if they don't exist, * in the default namespace. Set the local state to these values. */ const setLocalParametersToGlobalValues = useCallback( @@ -160,7 +163,7 @@ const SettingsPageParent = (props) => { console.log('Sending SetParameter request', currentRequest) service.callService(currentRequest, (response) => { console.log('For request', currentRequest, 'received SetParameter response', response) - // If it was succesful, and if the props specify, then call the action to update the + // If it was successful, and if the props specify, then call the action to update the // workspace walls. if (response.result.successful) { if (props.resetWorkspaceWallsOnParameterUpdate) { @@ -363,7 +366,7 @@ SettingsPageParent.propTypes = { localParamValues: PropTypes.arrayOf(PropTypes.any).isRequired, setLocalParamValues: PropTypes.func.isRequired, // A ref that contains a function to call after the "reset to preset" button - // succesfully sets the local and global parameters. This must be a ref to avoid + // successfully sets the local and global parameters. This must be a ref to avoid // unnecessary setting of global parameters. resetToPresetSuccessCallback: PropTypes.shape({ current: PropTypes.func.isRequired diff --git a/feedingwebapp/src/buttons/HoldButton.jsx b/feedingwebapp/src/buttons/HoldButton.jsx index 48349087..e62827f6 100644 --- a/feedingwebapp/src/buttons/HoldButton.jsx +++ b/feedingwebapp/src/buttons/HoldButton.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useEffect, useRef } from 'react' import Button from 'react-bootstrap/Button' diff --git a/feedingwebapp/src/buttons/MaskButton.jsx b/feedingwebapp/src/buttons/MaskButton.jsx index d667da83..c798cc0e 100644 --- a/feedingwebapp/src/buttons/MaskButton.jsx +++ b/feedingwebapp/src/buttons/MaskButton.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useEffect, useRef } from 'react' import Button from 'react-bootstrap/Button' diff --git a/feedingwebapp/src/buttons/ToggleButtonGroup.jsx b/feedingwebapp/src/buttons/ToggleButtonGroup.jsx index 863ccf6c..76f7e934 100644 --- a/feedingwebapp/src/buttons/ToggleButtonGroup.jsx +++ b/feedingwebapp/src/buttons/ToggleButtonGroup.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React from 'react' // PropTypes is used to validate that the used props are in fact passed to this Component diff --git a/feedingwebapp/src/helpers.js b/feedingwebapp/src/helpers.js index b3546e09..a49ea285 100644 --- a/feedingwebapp/src/helpers.js +++ b/feedingwebapp/src/helpers.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + import { useLayoutEffect, useState } from 'react' /** diff --git a/feedingwebapp/src/index.css b/feedingwebapp/src/index.css index cdc8d0da..4e37561a 100644 --- a/feedingwebapp/src/index.css +++ b/feedingwebapp/src/index.css @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', diff --git a/feedingwebapp/src/index.js b/feedingwebapp/src/index.js index 193e9015..46227200 100644 --- a/feedingwebapp/src/index.js +++ b/feedingwebapp/src/index.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + import React from 'react' import ReactDOM from 'react-dom' import './index.css' diff --git a/feedingwebapp/src/logo.svg b/feedingwebapp/src/logo.svg index 9dfc1c05..71694760 100644 --- a/feedingwebapp/src/logo.svg +++ b/feedingwebapp/src/logo.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/feedingwebapp/src/reportWebVitals.js b/feedingwebapp/src/reportWebVitals.js index dc6ff078..6d137fce 100644 --- a/feedingwebapp/src/reportWebVitals.js +++ b/feedingwebapp/src/reportWebVitals.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + const reportWebVitals = (onPerfEntry) => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { diff --git a/feedingwebapp/src/robot/README.md b/feedingwebapp/src/robot/README.md index 9945f711..4796b9e1 100644 --- a/feedingwebapp/src/robot/README.md +++ b/feedingwebapp/src/robot/README.md @@ -1,3 +1,3 @@ # Robot Components -The components in this folder are unique, in that they are intended to be run on a browser **on the same computer as the robot code**. These components subscribe directly to a ROS `CompressedImage` stream and render it in the browser. They then publish that stream via WebRTC to clients. The reason this works is that the subscription to the image topic happens on the same computer as their publication, and thus does not take up internet bandwidth. The publication to a client does go over the internet, but WebRTC handles latency and compression, ensuring efficient video transmission. \ No newline at end of file +The components in this folder are unique, in that they are intended to be run on a browser **on the same computer as the robot code**. These components subscribe directly to a ROS `CompressedImage` stream and render it in the browser. They then publish that stream via WebRTC to clients. The reason this works is that the subscription to the image topic happens on the same computer as their publication, and thus does not take up internet bandwidth. The publication to a client does go over the internet, but WebRTC handles latency and compression, ensuring efficient video transmission. diff --git a/feedingwebapp/src/robot/RobotVideoStreams.jsx b/feedingwebapp/src/robot/RobotVideoStreams.jsx index 7569f4d6..dd01f562 100644 --- a/feedingwebapp/src/robot/RobotVideoStreams.jsx +++ b/feedingwebapp/src/robot/RobotVideoStreams.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React from 'react' import PropTypes from 'prop-types' diff --git a/feedingwebapp/src/robot/VideoStream.jsx b/feedingwebapp/src/robot/VideoStream.jsx index d9c736d0..0021b08c 100644 --- a/feedingwebapp/src/robot/VideoStream.jsx +++ b/feedingwebapp/src/robot/VideoStream.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useCallback, useEffect, useMemo, useRef } from 'react' import PropTypes from 'prop-types' @@ -52,7 +55,7 @@ function VideoStream(props) { const ros = useRef(useROS().ros) /** - * Callback for when this page recieves an image from the robot. + * Callback for when this page receives an image from the robot. */ const imageCallback = useCallback( (message) => { diff --git a/feedingwebapp/src/ros/TestROS.jsx b/feedingwebapp/src/ros/TestROS.jsx index df970e23..b264130a 100644 --- a/feedingwebapp/src/ros/TestROS.jsx +++ b/feedingwebapp/src/ros/TestROS.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React from 'react' diff --git a/feedingwebapp/src/ros/TestROSAction.jsx b/feedingwebapp/src/ros/TestROSAction.jsx index 30144156..339e5c8b 100644 --- a/feedingwebapp/src/ros/TestROSAction.jsx +++ b/feedingwebapp/src/ros/TestROSAction.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useState } from 'react' diff --git a/feedingwebapp/src/ros/TestROSPublish.jsx b/feedingwebapp/src/ros/TestROSPublish.jsx index 03ca8c0d..ad08ca0b 100644 --- a/feedingwebapp/src/ros/TestROSPublish.jsx +++ b/feedingwebapp/src/ros/TestROSPublish.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useState } from 'react' diff --git a/feedingwebapp/src/ros/TestROSService.jsx b/feedingwebapp/src/ros/TestROSService.jsx index b971104b..1953126f 100644 --- a/feedingwebapp/src/ros/TestROSService.jsx +++ b/feedingwebapp/src/ros/TestROSService.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useState } from 'react' diff --git a/feedingwebapp/src/ros/TestROSSubscribe.jsx b/feedingwebapp/src/ros/TestROSSubscribe.jsx index 5f9ef281..e859bb87 100644 --- a/feedingwebapp/src/ros/TestROSSubscribe.jsx +++ b/feedingwebapp/src/ros/TestROSSubscribe.jsx @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import React, { useState } from 'react' diff --git a/feedingwebapp/src/ros/ros_helpers.js b/feedingwebapp/src/ros/ros_helpers.js index 02fc742c..e1d80426 100644 --- a/feedingwebapp/src/ros/ros_helpers.js +++ b/feedingwebapp/src/ros/ros_helpers.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // React imports import { useRos as useRosReact } from 'rosreact' import ROSLIB from 'roslib' diff --git a/feedingwebapp/src/setupTests.js b/feedingwebapp/src/setupTests.js index 52aaef1d..a0d4cea4 100644 --- a/feedingwebapp/src/setupTests.js +++ b/feedingwebapp/src/setupTests.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) diff --git a/feedingwebapp/src/webrtc/webrtc_helpers.js b/feedingwebapp/src/webrtc/webrtc_helpers.js index 121da6df..7e37dcbe 100644 --- a/feedingwebapp/src/webrtc/webrtc_helpers.js +++ b/feedingwebapp/src/webrtc/webrtc_helpers.js @@ -1,3 +1,6 @@ +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + // Code adapted from https://github.com/hcrlab/stretch_teleop_interface/blob/master/src/shared/webrtcconnections.tsx import axios from 'axios' diff --git a/feedingwebapp/start_robot_browser.js b/feedingwebapp/start_robot_browser.js old mode 100644 new mode 100755 index febb1750..66cb3b1c --- a/feedingwebapp/start_robot_browser.js +++ b/feedingwebapp/start_robot_browser.js @@ -1,5 +1,8 @@ #!/usr/bin/env node +// Copyright (c) 2024, Personal Robotics Laboratory +// License: BSD 3-Clause. See LICENSE.md file in root directory. + const { chromium } = require('playwright') const logId = 'start_robot_browser.js' From 4eceeba10b0b9dc5e8b0eaf8ec97300ee740540a Mon Sep 17 00:00:00 2001 From: Amal Nanavati Date: Thu, 12 Dec 2024 13:47:27 -0800 Subject: [PATCH 2/4] Fix CSS comments --- .pre-commit-config.yaml | 2 +- feedingwebapp/.eslintrc.js | 6 ++++-- feedingwebapp/server.js | 6 ++++-- feedingwebapp/src/App.css | 6 ++++-- feedingwebapp/src/App.jsx | 6 ++++-- feedingwebapp/src/Pages/Constants.js | 6 ++++-- feedingwebapp/src/Pages/Footer/Footer.jsx | 6 ++++-- feedingwebapp/src/Pages/GlobalState.jsx | 6 ++++-- feedingwebapp/src/Pages/Header/Header.jsx | 6 ++++-- feedingwebapp/src/Pages/Header/InfoModal.jsx | 6 ++++-- feedingwebapp/src/Pages/Header/TeleopSubcomponent.jsx | 6 ++++-- .../BiteSelectionUIStates/BiteSelectionButtonOverlay.jsx | 6 ++++-- .../Pages/Home/BiteSelectionUIStates/BiteSelectionName.jsx | 6 ++++-- .../Home/BiteSelectionUIStates/BiteSelectionPointMask.jsx | 6 ++++-- .../Home/BiteSelectionUIStates/ImageWithButtonName.jsx | 6 ++++-- .../Home/BiteSelectionUIStates/ImageWithButtonOverlay.jsx | 6 ++++-- .../Pages/Home/BiteSelectionUIStates/ImageWithPointMask.jsx | 6 ++++-- feedingwebapp/src/Pages/Home/Button.css | 6 ++++-- feedingwebapp/src/Pages/Home/Home.css | 6 ++++-- feedingwebapp/src/Pages/Home/Home.jsx | 6 ++++-- .../src/Pages/Home/MealStates/BiteAcquisitionCheck.jsx | 6 ++++-- feedingwebapp/src/Pages/Home/MealStates/BiteDone.jsx | 6 ++++-- feedingwebapp/src/Pages/Home/MealStates/BiteSelection.jsx | 6 ++++-- .../src/Pages/Home/MealStates/CircleProgressBar.jsx | 6 ++++-- feedingwebapp/src/Pages/Home/MealStates/DetectingFace.jsx | 6 ++++-- .../src/Pages/Home/MealStates/DetectingFaceSubcomponent.jsx | 6 ++++-- feedingwebapp/src/Pages/Home/MealStates/PostMeal.jsx | 6 ++++-- feedingwebapp/src/Pages/Home/MealStates/PreMeal.jsx | 6 ++++-- feedingwebapp/src/Pages/Home/MealStates/RobotMotion.jsx | 6 ++++-- feedingwebapp/src/Pages/Home/MealStates/progressbar.js | 6 ++++-- feedingwebapp/src/Pages/Home/VideoFeed.jsx | 6 ++++-- feedingwebapp/src/Pages/Settings/AutoContinue.jsx | 6 ++++-- feedingwebapp/src/Pages/Settings/BiteTransfer.jsx | 6 ++++-- feedingwebapp/src/Pages/Settings/CustomizeConfiguration.jsx | 6 ++++-- feedingwebapp/src/Pages/Settings/Main.jsx | 6 ++++-- feedingwebapp/src/Pages/Settings/PlanningScene.jsx | 6 ++++-- feedingwebapp/src/Pages/Settings/Settings.jsx | 6 ++++-- feedingwebapp/src/Pages/Settings/SettingsPageParent.jsx | 6 ++++-- feedingwebapp/src/buttons/HoldButton.jsx | 6 ++++-- feedingwebapp/src/buttons/MaskButton.jsx | 6 ++++-- feedingwebapp/src/buttons/ToggleButtonGroup.jsx | 6 ++++-- feedingwebapp/src/helpers.js | 6 ++++-- feedingwebapp/src/index.css | 6 ++++-- feedingwebapp/src/index.js | 6 ++++-- feedingwebapp/src/reportWebVitals.js | 6 ++++-- feedingwebapp/src/robot/RobotVideoStreams.jsx | 6 ++++-- feedingwebapp/src/robot/VideoStream.jsx | 6 ++++-- feedingwebapp/src/ros/TestROS.jsx | 6 ++++-- feedingwebapp/src/ros/TestROSAction.jsx | 6 ++++-- feedingwebapp/src/ros/TestROSPublish.jsx | 6 ++++-- feedingwebapp/src/ros/TestROSService.jsx | 6 ++++-- feedingwebapp/src/ros/TestROSSubscribe.jsx | 6 ++++-- feedingwebapp/src/ros/ros_helpers.js | 6 ++++-- feedingwebapp/src/setupTests.js | 6 ++++-- feedingwebapp/src/webrtc/webrtc_helpers.js | 6 ++++-- feedingwebapp/start_robot_browser.js | 6 ++++-- 56 files changed, 221 insertions(+), 111 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f9376bd..18d63453 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,7 +53,7 @@ repos: - .github/LICENSE_HEADER.md - --use-current-year - --comment-style - - "//" + - "/*| *| */" types_or: [javascript, jsx, ts, tsx, css] - repo: https://github.com/psf/black diff --git a/feedingwebapp/.eslintrc.js b/feedingwebapp/.eslintrc.js index c83578e1..b51e6fba 100644 --- a/feedingwebapp/.eslintrc.js +++ b/feedingwebapp/.eslintrc.js @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ module.exports = { root: true, diff --git a/feedingwebapp/server.js b/feedingwebapp/server.js index a504b2d3..a5c21339 100644 --- a/feedingwebapp/server.js +++ b/feedingwebapp/server.js @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ /** * Adapted from https://github.com/coding-with-chaim/webrtc-one-to-many/tree/master diff --git a/feedingwebapp/src/App.css b/feedingwebapp/src/App.css index 8898daad..ff2f9114 100644 --- a/feedingwebapp/src/App.css +++ b/feedingwebapp/src/App.css @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ .App { text-align: center; diff --git a/feedingwebapp/src/App.jsx b/feedingwebapp/src/App.jsx index 1ee00448..454c5b0d 100644 --- a/feedingwebapp/src/App.jsx +++ b/feedingwebapp/src/App.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import './App.css' diff --git a/feedingwebapp/src/Pages/Constants.js b/feedingwebapp/src/Pages/Constants.js index 98e28f23..1f19e952 100644 --- a/feedingwebapp/src/Pages/Constants.js +++ b/feedingwebapp/src/Pages/Constants.js @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ import { MEAL_STATE } from './GlobalState' diff --git a/feedingwebapp/src/Pages/Footer/Footer.jsx b/feedingwebapp/src/Pages/Footer/Footer.jsx index 8be5a3f0..9ebec2a7 100644 --- a/feedingwebapp/src/Pages/Footer/Footer.jsx +++ b/feedingwebapp/src/Pages/Footer/Footer.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback } from 'react' diff --git a/feedingwebapp/src/Pages/GlobalState.jsx b/feedingwebapp/src/Pages/GlobalState.jsx index fd8e417c..d3389e36 100644 --- a/feedingwebapp/src/Pages/GlobalState.jsx +++ b/feedingwebapp/src/Pages/GlobalState.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ /** * zustand is a state management system for React apps. It lets us manage global diff --git a/feedingwebapp/src/Pages/Header/Header.jsx b/feedingwebapp/src/Pages/Header/Header.jsx index af0f41c9..ce8fe227 100644 --- a/feedingwebapp/src/Pages/Header/Header.jsx +++ b/feedingwebapp/src/Pages/Header/Header.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useEffect, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Header/InfoModal.jsx b/feedingwebapp/src/Pages/Header/InfoModal.jsx index b1cf092a..f0e34753 100644 --- a/feedingwebapp/src/Pages/Header/InfoModal.jsx +++ b/feedingwebapp/src/Pages/Header/InfoModal.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useMemo, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Header/TeleopSubcomponent.jsx b/feedingwebapp/src/Pages/Header/TeleopSubcomponent.jsx index a75078ca..7cd9fd42 100644 --- a/feedingwebapp/src/Pages/Header/TeleopSubcomponent.jsx +++ b/feedingwebapp/src/Pages/Header/TeleopSubcomponent.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionButtonOverlay.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionButtonOverlay.jsx index 0d36069c..d8c231c9 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionButtonOverlay.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionButtonOverlay.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React from 'react' diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionName.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionName.jsx index c0969a83..ebd1625f 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionName.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionName.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React from 'react' diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionPointMask.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionPointMask.jsx index 82ba414f..331cfee6 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionPointMask.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/BiteSelectionPointMask.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React from 'react' diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonName.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonName.jsx index 57588b9a..0909ad39 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonName.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonName.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React from 'react' diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonOverlay.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonOverlay.jsx index c70e915c..23fb27df 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonOverlay.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithButtonOverlay.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React from 'react' diff --git a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithPointMask.jsx b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithPointMask.jsx index d3102db3..9e2555a0 100644 --- a/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithPointMask.jsx +++ b/feedingwebapp/src/Pages/Home/BiteSelectionUIStates/ImageWithPointMask.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React, { useState } from 'react' diff --git a/feedingwebapp/src/Pages/Home/Button.css b/feedingwebapp/src/Pages/Home/Button.css index 3dd631c2..d3cd9f83 100644 --- a/feedingwebapp/src/Pages/Home/Button.css +++ b/feedingwebapp/src/Pages/Home/Button.css @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ /* There is a known bug in Firefox where the buttons in this class don't change styles when clicked. Must be addressed before incorporating diff --git a/feedingwebapp/src/Pages/Home/Home.css b/feedingwebapp/src/Pages/Home/Home.css index 4fd8d1aa..7f3f7f2c 100644 --- a/feedingwebapp/src/Pages/Home/Home.css +++ b/feedingwebapp/src/Pages/Home/Home.css @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ .Resizer { background: #000; diff --git a/feedingwebapp/src/Pages/Home/Home.jsx b/feedingwebapp/src/Pages/Home/Home.jsx index b63d4e73..ed68e34f 100644 --- a/feedingwebapp/src/Pages/Home/Home.jsx +++ b/feedingwebapp/src/Pages/Home/Home.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useEffect, useMemo, useRef } from 'react' diff --git a/feedingwebapp/src/Pages/Home/MealStates/BiteAcquisitionCheck.jsx b/feedingwebapp/src/Pages/Home/MealStates/BiteAcquisitionCheck.jsx index 57044673..83db55a8 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/BiteAcquisitionCheck.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/BiteAcquisitionCheck.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React, { useCallback, useEffect, useState, useRef } from 'react' diff --git a/feedingwebapp/src/Pages/Home/MealStates/BiteDone.jsx b/feedingwebapp/src/Pages/Home/MealStates/BiteDone.jsx index 43f5f012..55429c9c 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/BiteDone.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/BiteDone.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React, { useCallback, useEffect, useRef, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Home/MealStates/BiteSelection.jsx b/feedingwebapp/src/Pages/Home/MealStates/BiteSelection.jsx index 84ca3ac4..3977edec 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/BiteSelection.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/BiteSelection.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Home/MealStates/CircleProgressBar.jsx b/feedingwebapp/src/Pages/Home/MealStates/CircleProgressBar.jsx index 9489376a..1620b11e 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/CircleProgressBar.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/CircleProgressBar.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // Import circle progress bar from progress bar package import { Circle } from './progressbar.js' diff --git a/feedingwebapp/src/Pages/Home/MealStates/DetectingFace.jsx b/feedingwebapp/src/Pages/Home/MealStates/DetectingFace.jsx index 8330b16d..e3d4fbaa 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/DetectingFace.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/DetectingFace.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React, { useCallback, useEffect, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Home/MealStates/DetectingFaceSubcomponent.jsx b/feedingwebapp/src/Pages/Home/MealStates/DetectingFaceSubcomponent.jsx index 8382cd0c..1101d333 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/DetectingFaceSubcomponent.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/DetectingFaceSubcomponent.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React, { useCallback, useEffect, useRef, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Home/MealStates/PostMeal.jsx b/feedingwebapp/src/Pages/Home/MealStates/PostMeal.jsx index 7f685a82..0a676a1e 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/PostMeal.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/PostMeal.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React, { useCallback } from 'react' diff --git a/feedingwebapp/src/Pages/Home/MealStates/PreMeal.jsx b/feedingwebapp/src/Pages/Home/MealStates/PreMeal.jsx index cb3096be..87f8e846 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/PreMeal.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/PreMeal.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React, { useCallback } from 'react' diff --git a/feedingwebapp/src/Pages/Home/MealStates/RobotMotion.jsx b/feedingwebapp/src/Pages/Home/MealStates/RobotMotion.jsx index c58770c7..d7a75617 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/RobotMotion.jsx +++ b/feedingwebapp/src/Pages/Home/MealStates/RobotMotion.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Home/MealStates/progressbar.js b/feedingwebapp/src/Pages/Home/MealStates/progressbar.js index c17dcb62..ceca916d 100644 --- a/feedingwebapp/src/Pages/Home/MealStates/progressbar.js +++ b/feedingwebapp/src/Pages/Home/MealStates/progressbar.js @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // ProgressBar.js 1.1.0 // https://kimmobrunfeldt.github.io/progressbar.js diff --git a/feedingwebapp/src/Pages/Home/VideoFeed.jsx b/feedingwebapp/src/Pages/Home/VideoFeed.jsx index b0a686ce..a1b93a37 100644 --- a/feedingwebapp/src/Pages/Home/VideoFeed.jsx +++ b/feedingwebapp/src/Pages/Home/VideoFeed.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React Imports import React, { useCallback, useEffect, useRef, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Settings/AutoContinue.jsx b/feedingwebapp/src/Pages/Settings/AutoContinue.jsx index 655467d1..2f3a4b63 100644 --- a/feedingwebapp/src/Pages/Settings/AutoContinue.jsx +++ b/feedingwebapp/src/Pages/Settings/AutoContinue.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useMemo, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Settings/BiteTransfer.jsx b/feedingwebapp/src/Pages/Settings/BiteTransfer.jsx index 7c71960b..12a466b3 100644 --- a/feedingwebapp/src/Pages/Settings/BiteTransfer.jsx +++ b/feedingwebapp/src/Pages/Settings/BiteTransfer.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Settings/CustomizeConfiguration.jsx b/feedingwebapp/src/Pages/Settings/CustomizeConfiguration.jsx index c7e0e5b6..a191a5c5 100644 --- a/feedingwebapp/src/Pages/Settings/CustomizeConfiguration.jsx +++ b/feedingwebapp/src/Pages/Settings/CustomizeConfiguration.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Settings/Main.jsx b/feedingwebapp/src/Pages/Settings/Main.jsx index 4a7ff399..99f536a6 100644 --- a/feedingwebapp/src/Pages/Settings/Main.jsx +++ b/feedingwebapp/src/Pages/Settings/Main.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useEffect, useRef, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Settings/PlanningScene.jsx b/feedingwebapp/src/Pages/Settings/PlanningScene.jsx index 439334bb..ef6d5922 100644 --- a/feedingwebapp/src/Pages/Settings/PlanningScene.jsx +++ b/feedingwebapp/src/Pages/Settings/PlanningScene.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' diff --git a/feedingwebapp/src/Pages/Settings/Settings.jsx b/feedingwebapp/src/Pages/Settings/Settings.jsx index 8fdfd587..8e7feac5 100644 --- a/feedingwebapp/src/Pages/Settings/Settings.jsx +++ b/feedingwebapp/src/Pages/Settings/Settings.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useMemo } from 'react' diff --git a/feedingwebapp/src/Pages/Settings/SettingsPageParent.jsx b/feedingwebapp/src/Pages/Settings/SettingsPageParent.jsx index aac9c692..0015121d 100644 --- a/feedingwebapp/src/Pages/Settings/SettingsPageParent.jsx +++ b/feedingwebapp/src/Pages/Settings/SettingsPageParent.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useEffect, useRef } from 'react' diff --git a/feedingwebapp/src/buttons/HoldButton.jsx b/feedingwebapp/src/buttons/HoldButton.jsx index e62827f6..9c57740c 100644 --- a/feedingwebapp/src/buttons/HoldButton.jsx +++ b/feedingwebapp/src/buttons/HoldButton.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useEffect, useRef } from 'react' diff --git a/feedingwebapp/src/buttons/MaskButton.jsx b/feedingwebapp/src/buttons/MaskButton.jsx index c798cc0e..0892d76a 100644 --- a/feedingwebapp/src/buttons/MaskButton.jsx +++ b/feedingwebapp/src/buttons/MaskButton.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useEffect, useRef } from 'react' diff --git a/feedingwebapp/src/buttons/ToggleButtonGroup.jsx b/feedingwebapp/src/buttons/ToggleButtonGroup.jsx index 76f7e934..f6525425 100644 --- a/feedingwebapp/src/buttons/ToggleButtonGroup.jsx +++ b/feedingwebapp/src/buttons/ToggleButtonGroup.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React from 'react' diff --git a/feedingwebapp/src/helpers.js b/feedingwebapp/src/helpers.js index a49ea285..89354813 100644 --- a/feedingwebapp/src/helpers.js +++ b/feedingwebapp/src/helpers.js @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ import { useLayoutEffect, useState } from 'react' diff --git a/feedingwebapp/src/index.css b/feedingwebapp/src/index.css index 4e37561a..4815f62f 100644 --- a/feedingwebapp/src/index.css +++ b/feedingwebapp/src/index.css @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ body { margin: 0; diff --git a/feedingwebapp/src/index.js b/feedingwebapp/src/index.js index 46227200..4a1429de 100644 --- a/feedingwebapp/src/index.js +++ b/feedingwebapp/src/index.js @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ import React from 'react' import ReactDOM from 'react-dom' diff --git a/feedingwebapp/src/reportWebVitals.js b/feedingwebapp/src/reportWebVitals.js index 6d137fce..348989d4 100644 --- a/feedingwebapp/src/reportWebVitals.js +++ b/feedingwebapp/src/reportWebVitals.js @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ const reportWebVitals = (onPerfEntry) => { if (onPerfEntry && onPerfEntry instanceof Function) { diff --git a/feedingwebapp/src/robot/RobotVideoStreams.jsx b/feedingwebapp/src/robot/RobotVideoStreams.jsx index dd01f562..44b22a51 100644 --- a/feedingwebapp/src/robot/RobotVideoStreams.jsx +++ b/feedingwebapp/src/robot/RobotVideoStreams.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React from 'react' diff --git a/feedingwebapp/src/robot/VideoStream.jsx b/feedingwebapp/src/robot/VideoStream.jsx index 0021b08c..eebcf5a0 100644 --- a/feedingwebapp/src/robot/VideoStream.jsx +++ b/feedingwebapp/src/robot/VideoStream.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useCallback, useEffect, useMemo, useRef } from 'react' diff --git a/feedingwebapp/src/ros/TestROS.jsx b/feedingwebapp/src/ros/TestROS.jsx index b264130a..000b840b 100644 --- a/feedingwebapp/src/ros/TestROS.jsx +++ b/feedingwebapp/src/ros/TestROS.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React from 'react' diff --git a/feedingwebapp/src/ros/TestROSAction.jsx b/feedingwebapp/src/ros/TestROSAction.jsx index 339e5c8b..9ce2b6cb 100644 --- a/feedingwebapp/src/ros/TestROSAction.jsx +++ b/feedingwebapp/src/ros/TestROSAction.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useState } from 'react' diff --git a/feedingwebapp/src/ros/TestROSPublish.jsx b/feedingwebapp/src/ros/TestROSPublish.jsx index ad08ca0b..5b4c5d51 100644 --- a/feedingwebapp/src/ros/TestROSPublish.jsx +++ b/feedingwebapp/src/ros/TestROSPublish.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useState } from 'react' diff --git a/feedingwebapp/src/ros/TestROSService.jsx b/feedingwebapp/src/ros/TestROSService.jsx index 1953126f..6b4e605f 100644 --- a/feedingwebapp/src/ros/TestROSService.jsx +++ b/feedingwebapp/src/ros/TestROSService.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useState } from 'react' diff --git a/feedingwebapp/src/ros/TestROSSubscribe.jsx b/feedingwebapp/src/ros/TestROSSubscribe.jsx index e859bb87..c2b437a1 100644 --- a/feedingwebapp/src/ros/TestROSSubscribe.jsx +++ b/feedingwebapp/src/ros/TestROSSubscribe.jsx @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import React, { useState } from 'react' diff --git a/feedingwebapp/src/ros/ros_helpers.js b/feedingwebapp/src/ros/ros_helpers.js index e1d80426..cf0ac20a 100644 --- a/feedingwebapp/src/ros/ros_helpers.js +++ b/feedingwebapp/src/ros/ros_helpers.js @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // React imports import { useRos as useRosReact } from 'rosreact' diff --git a/feedingwebapp/src/setupTests.js b/feedingwebapp/src/setupTests.js index a0d4cea4..d1e0adaa 100644 --- a/feedingwebapp/src/setupTests.js +++ b/feedingwebapp/src/setupTests.js @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: diff --git a/feedingwebapp/src/webrtc/webrtc_helpers.js b/feedingwebapp/src/webrtc/webrtc_helpers.js index 7e37dcbe..63353ed6 100644 --- a/feedingwebapp/src/webrtc/webrtc_helpers.js +++ b/feedingwebapp/src/webrtc/webrtc_helpers.js @@ -1,5 +1,7 @@ -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ // Code adapted from https://github.com/hcrlab/stretch_teleop_interface/blob/master/src/shared/webrtcconnections.tsx diff --git a/feedingwebapp/start_robot_browser.js b/feedingwebapp/start_robot_browser.js index 66cb3b1c..c167d4a7 100755 --- a/feedingwebapp/start_robot_browser.js +++ b/feedingwebapp/start_robot_browser.js @@ -1,7 +1,9 @@ #!/usr/bin/env node -// Copyright (c) 2024, Personal Robotics Laboratory -// License: BSD 3-Clause. See LICENSE.md file in root directory. +/* + * Copyright (c) 2024, Personal Robotics Laboratory + * License: BSD 3-Clause. See LICENSE.md file in root directory. + */ const { chromium } = require('playwright') const logId = 'start_robot_browser.js' From 468ff56f93d05dc60f7e15a2961bb2e1dd016abb Mon Sep 17 00:00:00 2001 From: Amal Nanavati Date: Thu, 12 Dec 2024 13:48:20 -0800 Subject: [PATCH 3/4] Attempt to address caniuse version issue --- feedingwebapp/package-lock.json | 58 ++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/feedingwebapp/package-lock.json b/feedingwebapp/package-lock.json index 4cde9e55..14fc1036 100644 --- a/feedingwebapp/package-lock.json +++ b/feedingwebapp/package-lock.json @@ -7408,9 +7408,9 @@ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, "node_modules/browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "funding": [ { "type": "opencollective", @@ -7419,13 +7419,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -7531,9 +7535,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001579", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz", - "integrity": "sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==", + "version": "1.0.30001688", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001688.tgz", + "integrity": "sha512-Nmqpru91cuABu/DTCXbM2NSRHzM2uVHfPnhJ/1zEAJx/ILBRVmz3pzH4N7DZqbdG0gWClsCC05Oj0mJ/1AWMbA==", "funding": [ { "type": "opencollective", @@ -9282,9 +9286,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.394", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.394.tgz", - "integrity": "sha512-0IbC2cfr8w5LxTz+nmn2cJTGafsK9iauV2r5A5scfzyovqLrxuLoxOHE5OBobP3oVIggJT+0JfKnw9sm87c8Hw==" + "version": "1.5.73", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.73.tgz", + "integrity": "sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg==" }, "node_modules/emittery": { "version": "0.8.1", @@ -9468,9 +9472,9 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "engines": { "node": ">=6" } @@ -15225,9 +15229,9 @@ "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" }, "node_modules/node-releases": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", - "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==" }, "node_modules/nopt": { "version": "5.0.0", @@ -20320,9 +20324,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "funding": [ { "type": "opencollective", @@ -20338,8 +20342,8 @@ } ], "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -20349,9 +20353,9 @@ } }, "node_modules/update-browserslist-db/node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/uri-js": { "version": "4.4.1", From f36f295f40bf357def26fa9b2fd465cb47be058c Mon Sep 17 00:00:00 2001 From: Amal Nanavati Date: Thu, 12 Dec 2024 14:47:52 -0800 Subject: [PATCH 4/4] Add License --- LICENSE.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..49d47d54 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) 2024, Personal Robotics Laboratory + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.