Viewing camera on ROS2

0. Install Docker on a Linux system

Download and install Docker as shown in the picture image-2024030900016

1. Start ROS Wifi image transmission module ROS2 agent

  1. First, start the STA mode of the ROS Wifi image transmission module (default start) and allow ESP32 to connect to an internet enabled WiFi in the local environment. Note: When using AP mode, you cannot enter the proxy because entering the proxy requires a network, and AP mode does not have a network
  2. The proxy host also needs to be connected to the same local area network as the ROS Wifi image transmission module Proxy host: It is a Linux system with ROS2 (Humble version) installed
  3. Query the IP address of the proxy host Enter the command ifconfig image-2023032900001
  4. Then use a serial port tool to configure the ROS Wifi image transmission module's ROS2 proxy host address
  1. After completing the proxy configuration of the ROS Wifi image transmission module, execute the following command on the proxy host

The successful entry result is shown in the figure: image-2023032900005 There must be so much information to correctly activate the agent. Missing one may require manually powering off and resetting the ROS Wifi image transmission module According to the proxy results in the above figure, the IP of the ROS Wifi image transmission module can be obtained as 192.168.2.114

  1. Query ROS2 nodes, topic information, topic publishing frequency, and topic message types published by the ROS Wifi image transmission module

Publishing nodes

image-2023032900007

Topic information

image-2023032900006 image-2023032900008

Message type

image-2023032900009

Topic posting frequency

image-2023032900010

2.ROS2 obtains camera image

Note: If using a virtual machine provided in the data, only refer to step 4

  1. First, create a folder and execute the following command
  1. Place the provided yahboom_esp32_camera in the path you just created and unzip it image-2023032900011
  2. Then compile the feature pack and add the environment
  1. Run the command to open the camera screen

image-2023032900012

3.View images in RVIZ

  1. Under the premise that ROS2 obtains the camera image, open the installed rviz software
  1. Replace the topic of fixed frame with /esp32_img image-2023032900013
  2. Then load the image of this topic image-2023032900014
  3. Finally, rviz displays the image of the camera image-2023032900015

4.matters needing attention

  1. If the host actively disconnects the agent, the ROS Wifi image transmission module needs to be manually powered off and restarted before it can be restored and connected to the agent
  2. This port of 9999 will be used for proxy entry, so I should avoid using this port in my future development
  3. The use of proxies can only be configured through STA (Local Area Network) mode.