5.2.2 Data Display
Web Display
Overview
Web display is used to preview camera images (JPEG format) and algorithm results. Images and algorithm results are transmitted over the network to a PC browser for rendering. The display client also supports showing video only without rendering intelligent results.
Code repository: https://github.com/D-Robotics/hobot_websocket
Supported Platforms
| Platform | Runtime Environment | Example Function |
|---|---|---|
| RDK X3, RDK X3 Module | Ubuntu 20.04 (Foxy), Ubuntu 22.04 (Humble) | Start MIPI camera and display images via Web |
| RDK X5, RDK X5 Module,RDK S100 | Ubuntu 22.04 (Humble) | Start MIPI camera and display images via Web |
| RDK S600 | Ubuntu 24.04 (Jazzy) | Start MIPI camera and display images via Web |
Prerequisites
RDK Platform
-
Confirm the F37 camera is correctly connected to RDK
-
Confirm the PC can access RDK over the network
-
Confirm TogetheROS.Bot has been successfully installed
Usage
RDK Platform
-
Log in to RDK via SSH and start the board-side programs
a. Start mipi_cam
- Foxy
- Humble
- Jazzy
# Configure tros.b environment
source /opt/tros/setup.bash# Configure tros.b environment
source /opt/tros/humble/setup.bash# Configure tros.b environment
source /opt/tros/jazzy/setup.bash- Humble
# Configure tros.b environment
source /opt/tros/humble/setup.bash- Jazzy
# Configure tros.b environment
source /opt/tros/jazzy/setup.bashros2 launch mipi_cam mipi_cam.launch.py mipi_video_device:=F37b. Start encoding
- Foxy
- Humble
- Jazzy
# Configure tros.b environment
source /opt/tros/setup.bash# Configure tros.b environment
source /opt/tros/humble/setup.bash# Configure tros.b environment
source /opt/tros/jazzy/setup.bash- Humble
# Configure tros.b environment
source /opt/tros/humble/setup.bash- Jazzy
# Configure tros.b environment
source /opt/tros/jazzy/setup.bashros2 launch hobot_codec hobot_codec_encode.launch.pyc. Start websocket
- Foxy
- Humble
- Jazzy
# Configure tros.b environment
source /opt/tros/setup.bash# Configure tros.b environment
source /opt/tros/humble/setup.bash# Configure tros.b environment
source /opt/tros/jazzy/setup.bash- Humble
# Configure tros.b environment
source /opt/tros/humble/setup.bash- Jazzy
# Configure tros.b environment
source /opt/tros/jazzy/setup.bashros2 launch websocket websocket.launch.py websocket_image_topic:=/image_jpeg websocket_only_show_image:=true -
Enter
http://IP:8000in a PC browser (Chrome/Firefox/Edge) to view the image, where IP is the RDK IP address.
Notes
-
websocket requires port 8000. If the port is occupied, startup will fail. Solutions:
-
Use the
lsof -i:8000command to check which process is using port 8000, then usekill <PID>to close the process occupying port 8000, and restart websocket. -
If you do not want to stop the service currently using port 8000, you can modify the
listenport number in the/opt/tros/${TROS_DISTRO}/lib/websocket/webservice/conf/nginx.confconfiguration file to a port number greater than 1024 that is not in use. After changing the port number, the URL used in the browser must also be updated accordingly.
-
HDMI Display
Overview
This section describes how to display camera NV12 images via HDMI. Connect RDK to a display via HDMI to show real-time image output, corresponding to the hobot_hdmi package.
Code repository: https://github.com/D-Robotics/hobot_hdmi
Supported Platforms
| Platform | Runtime Environment | Example Function |
|---|---|---|
| RDK X3, RDK X3 Module | Ubuntu 20.04 (Foxy), Ubuntu 22.04 (Humble) | Start MIPI camera and display images via HDMI |
| RDK X5, RDK X5 Module | Ubuntu 22.04 (Humble) | Start MIPI camera and display images via HDMI |
HDMI display EOL notice:
RDK X3andRDK X3 Moduleplatforms are supported up to version2.1.0, corresponding to TROS version2.2.0 (2024-04-11).RDK X5andRDK X5 Moduleplatforms are supported up to version2.4.2, corresponding to TROS version2.3.1 (2024-11-20).