personalrobotics / feeding_web_interface

Web interface for the robot-assisted feeding system
1 stars 0 forks source link

Implement WebRTC #114

Closed amalnanavati closed 10 months ago

amalnanavati commented 10 months ago

Describe this pull request. Link to relevant GitHub issues, if any.

Joint with ada_feeding#154.

In service of #112 , this PR implements a WebRTC connection for streaming video from the robot to the client. It implements "Option A" from #112 . Specifically, it launches a headless browser on lovelace to be one end of the P2P connection. Although this should not be necessary (see Option B in #112 ), it was the most straightforward to implement given that is the approach stretch_teleop_interface used.

As such, this PR changes the web app's launch procedure on lovelace. Whereas earlier one had to launch the web app and the web_video_server, now they have to run:

  1. The web app: npm run start (or cd build; python3 -m http.server 3000 if you have already run npm run build).
  2. The WebRTC signaling server: node --env-file=.env server.js
  3. The robot browser: node --env-file=.env start_robot_browser.js (NOTE: The robot browser must be the last of the web app commands to run!)

Explain how this pull request was tested, including but not limited to the below checkmarks.

Setup:

Testing: The below tests were run with the real web app running (see launch procedure above), the real perception launchfile, but the dummy motion action servers.


Before creating a pull request

Before merging a pull request