ROS2 Basic Development
Experiment 04 - ROS2 Camera Application
Materials required: One RDK-X5 mainboard, one USB camera
1. Experiment Steps
(1) Camera Connection Check
Connect the USB camera to the development board and run ls /dev/video* to check camera connection


As shown in the figure, the camera is connected successfully. (Here, video0 is used as an example)
(2) Activate Camera
- Run
cd ~/ros2_ws && colcon build --packages-select arm_demo, enter the ros2 workspace and build the arm_demo package.

- Then run
source ~/ros2_ws/install/setup.bash# Activate workspace

- Finally run
ros2 launch arm_demo camera.launch.py# Run camera.launch.py file (Here the camera uses default video0, if you need to modify, modify the default value in launch file on line 26 ofcamera.launch.py)
At this point, you will see terminal print information:


And a window appears with real-time footage

At this step, the camera has been successfully activated!
