This chapter covers
- Executing robot commands over the network using SSH
- Creating web services to control robots
- Calling robot web services from Python
- Creating Python-based remote execution functions
- Measuring the execution time of local and remote HTTP commands
- Building a high-performance Python client with low-latency calls
This chapter will teach you how to share your robot over your network so that remote Python clients can issue movement commands to control it. Both SSH and HTTP protocols will be used, meaning that two solutions from a protocol perspective will be offered, each with its own set of benefits and tradeoffs. For the HTTP solution, a simple Python client will be created first, followed by a more complex, higher-performance low-latency client. Furthermore, different techniques for measuring the execution time will be covered as well. This will provide a quantitative basis to compare the performance of different protocols and clients.
Controlling robots remotely is an essential part of many projects, such as using apps on mobile phones and laptops to control robots, as well as controlling a fleet of robots using a central robot server. The projects in this chapter make it possible to control robots in the same room or many miles away. Unlike short-range protocols such as Bluetooth, both SSH and HTTP support short- and long-range connectivity.