6 Creating robot web apps

 

This chapter covers

  • Creating a desktop- and mobile-friendly web application to control robots
  • Measuring web application performance using web browser tools
  • Creating dynamic pages using Tornado templates
  • Enabling enhanced web logging to detect web request failures

This chapter will teach you how to build a web application to control your robot. The application will work equally well on desktop computers and mobile phones. The full range of robot movements will be available through the application, along with commands that can be used to measure the network performance of the application, end to end. As we build the application, you will learn useful techniques for measuring the application performance, as well as detecting and fixing certain types of web request failures.

Web applications provide a powerful platform to build a mechanism for controlling the robot by a human operator. Web apps are accessible both from the desktop application and mobile devices. They also work consistently across the main desktop operating systems (i.e., Windows, Mac, and Linux).

6.1 Hardware stack

Figure 6.1 shows the hardware stack, with the specific components used in this chapter highlighted. In this chapter, we can use the mouse as a human-interactive device to interact with the robot through our web app.

Figure 6.1 Hardware stack: the DC motors will be controlled over the network using a web interface.

6.2 Software stack

6.3 Moving robots forward and backward over the web

6.3.1 Creating a basic web application

6.3.2 Detecting failed requests

6.3.3 Moving robots forward with web apps

6.4. Creating a full-movement web app

6.4.1 Creating the full-movement application

6.4.2 Web interface design

6.4.3 Measuring application performance in the browser

6.4.4 Web hardware devices

Summary