How to Use Multiple CSI Cameras on reComputer with ROS
Introduction
This tutorial provides a step-by-step guide on how to read multiple CSI camera image data through ROS on reComputer J30/J40 series devices and publish image topics to be displayed in the RVIZ visualization interface.
Prerequisites
reComputer J30/40 series: Ensure you have completed the installation of the JetPack 5.x system and the ROS Noetic environment according to the provided tutorials.
Supported cameras are as follows:
IMX219 cameras
- Raspberry Pi Camera V2
- IMX219-130 8MP Camera with 130° FOV
- IMX219-160 8MP Camera with 160° FOV
- IMX219-200 8MP Camera with 200° FOV
- IMX219-77 8MP Camera with 77° FOV
- IMX219 M12/CS mount CMOS Camera Module
- IMX219-83 8MP 3D Stereo Camera Module
- IMX219-77IR 8MP IR Night Vision Camera with 77° FOV
- IMX219-160IR 8MP Camera with 160° FOV
- IMX219 M12/CS mount CMOS Camera Module
IMX477 cameras
Getting Started
Connecting the Cameras
Please follow this tutorial to complete the Connecting and testing of the CSI cameras, and ensure that ROS is already installed on your system.
Installation
Step 1: Open a terminal on your reComputer and create a directory for your workspace:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/srcStep 2: Clone the desired ROS package:
git clone https://github.com/ZhuYaoHui1998/csi_camera_reader.git
Step 3: Build the workspace:
cd ~/catkin_ws/
catkin_makeStep 4: Source the setup file again to update your environment:
source devel/setup.bash
Usage
To publish the one camera stream to the ROS topic /csi_cam_0/image_raw, use this command in the terminal:
roslaunch csi_camera_reader csi_camera.launch sensor_id:=0
You can also change sensor_id to 1 to match your interface:
roslaunch csi_camera_reader csi_camera.launch sensor_id:=1
If you want to open two CSI cameras simultaneously and publish topics to ROS, you can execute the following commands:
roslaunch csi_camera_reader dual_camera.launch
You can enter the "rostopic list" command in the terminal to see the image topics published by the cameras.
You can also use the RVIZ visualization tool to subscribe to the image topics and view the visual information.
Tech Support & Product Discussion
Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.