Teleoperating and visualizing a robot on a web browser
This is the first project in this chapter. As we have seen in the other chapters, we are starting with a simple project. This web application can teleoperate the robot from the web browser itself using a keyboard. Along with the teleoperation, we can also visualize the robot in the browser itself. Here is the working block diagram of this project:
Figure 3: Working of web-based robot keyboard teleoperation project
Working of the project
In this section, we can see the basic working of this project. Imagine that a Turtlebot simulation is running on your PC. We have to control the robot from the web based teleoperation, so when we press a button from web browser, the key press is detected using JavaScript code and map each key press to ROS Twist message. This is done by using rosbridge clients. The rosbridge client sends Twist message as JSON command to the rosbridge server. The communication is happening over WebSockets as shown in the...