Install the web_video_server package. Switch to your catkin workspace and clone the package code to the src folder:
$ git clone https://github.com/RobotWebTools/web_video_server.git
Build the package using the catkin_make command.
Download the mjpegcanvasjs module. You can simply use the following command:
$ git clone https://github.com/rctoris/mjpegcanvasjs
Okay, you are done with the packages and modules. Now you can check the code in chapter_12_codes/ros_web_ws/ws/Robot_Surveillance.html.
We'll now discuss the main parts of the code.