Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix perception race conditions, web app streaming, and F/T QoS #151

Merged
merged 5 commits into from
Jan 10, 2024

Conversation

amalnanavati
Copy link
Contributor

Description

This PR addresses miscellaneous bugs in the system:

  1. The F/T thresh idiom subscribed to the F/T readings with a QoS including RELIABILITY, which is incompatible with the F/T sensor's publication of BEST_EFFORT. This PR addresses that.
  2. Both SegmentFromPoint and FaceDetection had a race condition where sometimes they attempt to get the type of message being sent on an image topic before republisher has advertised that topic, throwing a ValueError. Since we have mostly converged to the message types we will be using, this PR adds a fallback to a hardcoded message type if publishers for those topics are not yet alive.
  3. Since feeding_web_interface#106, the web app expects the face detection image to be a CompressedImage, which this PR addresses.
  4. As documented in feeding_web_interface#111, to avoid latency the web app needs a rate-limited publication of video streams. This PR extends republisher to rate-limit streams, and rate-limits the streams rendered on the web app to 3Hz (can be tuned).

Testing procedure

  • Pull this code and the affiliated feeding_web_interface#111 and re-build the workspace.
  • Run the read robot code and the web app.
  • Verify that the robot code is receiving F/T messages (i.e., the watchdog is not tripping)
  • Go to bite selection in the web app, move your hand in and out of the camera, verify that the latency is not more than 1-2 secs.
  • Go to the DetectingFace page in the web app, move your head around in front of the camera, verify that the latency is not more than 1-2 secs.

Before opening a pull request

  • Format your code using black formatter python3 -m black .
  • Run your code through pylint and address all warnings/errors. The only warnings that are acceptable to not address is TODOs that should be addressed in a future PR. From the top-level ada_feeding directory, run: pylint --recursive=y --rcfile=.pylintrc ..

Before Merging

  • Squash & Merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant