UP | HOME

Intel Realsense D435i

Description

The Intel RealSense D435i is an RGB-D depth camera with an integrated inertial measurement unit (IMU). These cameras provide robots with a 3 dimensional view of the world allowing you to create algorithms that reason about 3D structures. The addition of an IMU helps the system orient itself when moving.

Setup

Installation

There are two components required to use the RealSense from ROS: the library (https://index.ros.org/p/librealsense2/) and the ROS wrapper (realsense2_camera). There is also the (realsense2_description) package that provides a URDF for the camera.

This class uses a customized version of the realsense library, as explained in Computer Setup

Testing

  1. Plug in the RealSense
  2. Run realsense-viewer. If prompted to update the firmware, do it.
    • Be patient, it can take a while.
    • Dismiss the "Software Update" if prompted, but do the recommended firmware update.
  3. Confirm that the RealSense works in the viewer by turning on the stereo module and RGB camera.

Using

  1. There are 4 ways of using the realsense in ROS: the ROS driver, regular USB camera drivers, the C++ SDK, or the python SDK
  2. The ROS driver provides the most flexibility for several reasons:
    • By exposing the data from realsense as topics, multiple nodes can easily access the information
    • There is a common interface for Point cloud producing devices in ROS, so the sensor could be swapped out for another one if it does not meet your needs
    • Therefore, in most cases, the ROS driver is the preferred method for accessing the realsense
  3. Sometimes, the Realsense is just being used as a convenient USB camera: in that case the USB camera driver can be used with one of the /dev/video devices belonging to the realsense and it will be treated as a regular camera.

ROS Driver

  • Instructions for use and an explanation of the topics that are published are posted on the realsense-ros github page.
  • The most common way to launch the realsense in ROS is with it's Launchfile:
    • ros2 launch realsense2_camera rs_launch.py depth_module.profile:=1280x720x30 pointcloud.enable:=true
    • There are many options and parameters and topics, so you can explore further. For example align_depth.enable:=true will provide depth-aligned images
      • A few key namespaces and topics are: /camera/camera/color: This is the namespace for the RGB camera. It has both image_raw and camera_info topics /camera/camera/depth/color/points: This is the point cloud /camera/camera/depth/image_rect_raw: This is the depth image /camera/camera/extrinsics/depth_to_color: This is the transform from the depth to RGB frames
  • To interpret the depth image values see This example
    • Basically each pixel is a 16 bit integer that is the distance in mm

SDK

  • Official documentation is here for using SDK 2.0: https://dev.intelrealsense.com/docs/docs-get-started
  • Use librealsense python wrappers: wrappers around librealsense for more advanced usage in python
  • Use librealsense from C++
    • This is for advanced and fast point cloud processing

Author: Matthew Elwin.