Skip to content

Bound camera RPC waits and feed shutdown - #2

Open
walker2398 wants to merge 3 commits into
kercre123:masterfrom
walker2398:agent/camera-rpc-timeouts
Open

walker2398 wants to merge 3 commits into
kercre123:masterfrom
walker2398:agent/camera-rpc-timeouts

Conversation

@walker2398

@walker2398 walker2398 commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • add configurable native gRPC deadlines to single-image capture and streaming-status queries
  • explicitly cancel the underlying camera-feed iterator during shutdown
  • bound feed shutdown and its remote streaming-status checks

Root cause

Camera RPCs previously had no deadlines. close_camera_feed() attempted to enforce a ten-second limit with a polling loop, but each image_streaming_enabled() call used an unbounded future.result(). A delayed robot or network could therefore block shutdown indefinitely. Cancelling the task also did not explicitly cancel the wrapped gRPC iterator.

This change intentionally keeps the existing gRPC transport and public behavior. It does not add an HTTP fallback or another camera workflow.

Validation

  • Python 3.11 and 3.12: anki_vector/camera.py compiles successfully
  • git diff --check
  • Vector firmware 2.0.1.6076ep: capture returned 640x360 in 0.797 seconds; CameraFeed delivered a frame; close completed in 0.409 seconds; IsImageStreamingEnabled returned false afterward

@walker2398
walker2398 marked this pull request as ready for review August 2, 2026 11:14
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