Our Raspberry Pi has already been able to run web services, using Flask to create a menu server and video servers. We can use image and control queues to make a behavior interact with a web server. We are going to reuse these capabilities. In the phone app, the slider controls will need to be smart. The next diagram shows the parts of our manual drive system:
At the bottom layer, the stop motors and set motor speed calls are made to the robot. These are from the behavior based on timeouts or on the control message queue from the server. Meanwhile, the behavior loop will also be taking image frames from the camera, encoding them, and pushing them onto the display frame queue.
The next layer up is the Flask web server. This consumes the display frame queue supplying frames...