isaac_ros_image_proc

Source code on GitHub.

Quickstart

  1. Set up your development environment by following the instructions here.

  2. Clone isaac_ros_common and this repository under ${ISAAC_ROS_WS}/src.

    cd ${ISAAC_ROS_WS}/src
    
    git clone -b release-3.1 https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git isaac_ros_common
    
git clone -b release-3.1 https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_image_pipeline.git isaac_ros_image_pipeline
  1. Build the RealSense camera package for Humble, using this doc.

  2. Launch the Docker container using the run_dev.sh script:

    cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \
      ./scripts/run_dev.sh
    
  3. Install this package’s dependencies.

    sudo apt-get install -y ros-humble-isaac-ros-image-proc
    
  4. Start isaac_ros_image_proc using the prebuilt executable (Using RealSense camera as an example):

    ros2 run isaac_ros_image_proc isaac_ros_image_proc --ros-args -r /image_raw:=/camera/color/image_raw --ros-args -r /camera_info:=/camera/color/camera_info
    
  5. In a separate terminal, spin up a calibrated camera publisher to /image_raw and /camera_info using any package(for example, realsense2_camera):

    ros2 launch realsense2_camera rs_launch.py
    
  6. Observe the image output in grayscale and color on /image_mono and /image_rect_color, respectively:

    ros2 run image_view image_view --ros-args -r image:=image_mono
    ros2 run image_view image_view --ros-args -r image:=image_rect_color
    

Note

For RealSense camera package issues, please refer to the section here.

Other supported cameras can be found here.

For camera calibration, please refer to this guide.

API

Overview

The isaac_ros_image_proc package offers functionality for rectifying/undistorting images from a monocular camera setup, resizing the image, and changing the image format. It largely replaces the image_proc package, though the image format conversion facility also functions as a way to replace the CPU-based image format conversion in cv_bridge. The rectify node can also resize the image; if resizing is not needed, specify the output width/height same as input.

Available Components

Component

Topics Subscribed

Topics Published

Parameters

ImageFormatConverterNode

image_raw, camera_info: The input camera stream

image: The converted image

encoding_desired: Target encoding to convert to.

RectifyNode

image_raw, camera_info: The input camera stream

image_rect, camera_info_rect: The rectified camera stream

output_height: The absolute height to resize to output_width: The absolute width to resize to

ResizeNode

image, camera_info: The input camera stream

resize/image, resize/camera_info: The resized camera stream

output_height: The absolute height to resize to output_width: The absolute width to resize to num_blocks: The number of pre-allocated memory blocks, should not be less than 40. keep_aspect_ratio: The flag to keep the aspect_ratio when set to true

ImageFlipNode

image: The input image data

image_flipped: The flipped image

flip_mode: Supports 3 modes - HORIZONTAL, VERTICAL, and BOTH

Limitation: isaac_ros_image_proc nodes require even number dimensions for images.