Skip to main content

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

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/src
  • Step 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_make
  • Step 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.

Loading Comments...