Main Content

Installation of ROS Drivers for Intel RealSense Devices

Follow the installation steps provided below for getting the Intel® RealSenseTM ROS driver setup ready for the camera sensor setup. These steps help you to download and install all the dependent packages and ROS drivers for the Intel RealSense setup. These steps are captured from the IntelRealSense ROS page.

These steps assume that you have Installed ROS melodic on your machine.

  1. Install the realsense2_camera ROS package and its dependents, including librealsense2 library and matching udev-rules, using the below command:

    sudo apt-get install ros-$ROS_DISTRO-realsense2-camera
  2. Create a catkin workspace for the source installation using the below commands.

    Note

    It is recommended that you create a workspace with a new name if you already have a workspace with name catkin_ws.

    mkdir -p ~/catkin_ws/src
    cd ~/catkin_ws/src
  3. Clone the ROS packages from the IntelRealSense ROS GitHub® page using the below command.

    git clone https://github.com/IntelRealSense/realsense-ros.git
    cd realsense-ros/
    git checkout `git tag | sort -V | grep -P "^2.\d+\.\d+" | tail -1
    cd ..
  4. Install the dependent package ros-melodic-ddynamic-reconfigure using the below command.

    sudo apt-get install ros-melodic-ddynamic-reconfigure
  5. Build the workspace using the below command.

    catkin_init_workspace
    cd ..
    catkin_make clean
    catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release
    catkin_make install
    echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
    source devel/setup.bash

Note

These installation steps are verified on the ROS melodic distribution only.

Usage Instructions

To verify the installation, start the camera node in ROS using below command.

roslaunch realsense2_camera demo_pointcloud.launch

This streams all camera sensors and publish on the appropriate ROS topics. Type rostopic list in another terminal to see all the published ROS topics.