Intel(R) RealSense(TM) ROS Wrapper for D400 series and SR300 Camera
Clone or download

README.md

ROS Wrapper for Intel® RealSense™ Devices

These are packages for using Intel RealSense cameras (D400 series and the SR300) with ROS.

Installation Instructions

The following instructions support ROS Indigo, on Ubuntu 14.04, and ROS Kinetic, on Ubuntu 16.04.

The simplest way to install on a clean machine is to follow the instructions on the .travis.yml file. It basically summerize the elaborate instructions in the following 3 steps:

Step 1: Install the latest Intel® RealSense™ SDK 2.0

  • Install from Debian Package - In that case treat yourself as a developer. Make sure you follow the instructions to also install librealsense2-dev package.

OR

Step 2: Install the ROS distribution

Step 3: Install Intel® RealSense™ ROS from Sources

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src/
  • Clone the latest Intel® RealSense™ ROS from here into 'catkin_ws/src/'
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 ~/.bashrc

Usage Instructions

Start the camera node

To start the camera node in ROS, install rgbd_launch:

sudo apt-get install ros-kinetic-rgbd-launch

Then type:

roslaunch realsense2_camera rs_camera.launch

This will stream all camera sensors and publish on the appropriate ROS topics.

Other stream resolutions and frame rates can optionally be provided as parameters to the 'rs_camera.launch' file.

RGBD Point Cloud

Here is an example of how to start the camera node and make it publish the RGBD point cloud using aligned depth topic.

roslaunch realsense2_camera rs_rgbd.launch

Aligned Depth Frames

Here is an example of how to start the camera node and make it publish the aligned depth stream to other available streams such as color or infra-red.

roslaunch realsense2_camera rs_aligned_depth.launch

Set Camera Controls Using Dynamic Reconfigure Params

The following command allow to change camera control values using [http://wiki.ros.org/rqt_reconfigure].

rosrun rqt_reconfigure rqt_reconfigure

Work with multiple cameras

Here is an example of how to start the camera node and streaming with two cameras using the rs_multiple_devices.launch.

roslaunch realsense2_camera rs_multiple_devices.launch serial_no_camera1:=<serial number of the first camera> serial_no_camera2:=<serial number of the second camera>

The camera serial number should be provided to serial_no_camera1 and serial_no_camera2 parameters. One way to get the serial number is from the rs-enumerate-devices tool.

Another war of obtaining the serial number is connecting the camera alone, running

roslaunch realsense2_camera rs_camera.launch

and looking for the serial number in the log printed to screen under "[INFO][...]Device Serial No:".

Another way to use multiple cameras is running each from a different terminal. Make sure you set a different namespace for each camera using the "camera" argument:

roslaunch realsense2_camera rs_camera.launch camera:=cam_1 serial_no:=<serial number of the first camera>
roslaunch realsense2_camera rs_camera.launch camera:=cam_2 serial_no:=<serial number of the second camera>
...

Enabling post processing filters.

realsense2_camera includes some built in post processing filters:
colorizer - creates an RGB image instead of depth image. Used to visualize the depth image.
spatial - filter the depth image spatially.
temporal - filter the depth image temporally.
pointcloud - it is now possible to enable point cloud with the same command as any other post processing filter.

The colorizer filter replaces the image in the topic: //depth/image_rect_raw. The spatial and temporal filters affect the depth image and all that is derived from it, i.e. pointcloud and colorizer.

to activate the filters, use the argument "filters" and deperate them with a comma:

roslaunch realsense2_camera rs_camera.launch filters:=temporal,spatial,pointcloud

Packages using RealSense ROS Camera

Title Links
ROS Object Analytics github / ROS Wiki

Known Issues

  • This ROS node does not currently support ROS Lunar Loggerhead.
  • This ROS node does not currently work with ROS 2.
  • This ROS node currently does not provide the unit-tests which ensure the proper operation of the camera. Future versions of the node will provide ROS compatible unit-tests.

License

Copyright 2018 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

*Other names and brands may be claimed as the property of others