Welcome to ROSMASTER X3 Plus repository
6.7 Web page real-time monitor
7. Web page real-time monitoring
7. Web page real-time monitoring 7.1. Environment Construction 7.2. modify the launch file 7.3. effect demonstration
7.1. Environment Construction
#Raspberry Pi 5 master needs to enter docker first, please perform this step#If running the script into docker fails, please refer to the ROS/07.Docker tutorial~/run_docker.shxxxxxxxxxxsudo apt-get install ros-melodic-async-web-server-cpp ros-melodic-web-video-server ros-melodic-usb-cam
First make sure that the USB camera link is correct, enter the following command to check that the USB device number exists and is video0
xxxxxxxxxxll /dev

If the execute permission is not enough, you need to add the execute permission
xxxxxxxxxxsudo chmod 777 /dev/video*
7.2. modify the launch file
xxxxxxxxxxsudo vim /opt/ros/melodic/share/usb_cam/launch/usb_cam-test.launch
Keep hitting the keyboard [d] to delete everything. Click [i] on the keyboard to enter the edit mode, and write the following content into it.
xxxxxxxxxx< launch > < arg name = "open_view" default = "false" /> < node name = "usb_cam" pkg = "usb_cam" type = "usb_cam_node" output = "screen" > < param name = "video_device" value = "/dev/video0" /> < param name = "image_width" value = "640" /> < param name = "image_height" value = "480" /> < param name = "pixel_format" value = "yuyv" /> < param name = "camera_frame_id" value = "usb_cam" /> < param name = "io_method" value = "mmap" /> </ node > <!-- web_video_server --> < node pkg = "web_video_server" type = "web_video_server" name = "web_video_server" output = "screen" /> <!-- image_view --