personalrobotics / ada_feeding

Robot-assisted feeding demos and projects for the ADA robot
4 stars 4 forks source link

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

Closed amalnanavati closed 9 months ago

amalnanavati commented 9 months ago

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

Before opening a pull request

Before Merging