LIPS OpenNI2 SDK is fully compatible with ROS. In this article, we demonstrate how to use ROS wrapper to access 3D cameras and display pointcloud in Rviz viewer.


ROS Installation

we use Ubuntu 20.04 and ROS Noetic in the following tutorial. You can also find official install documentation here

  • Install ROS via apt

sudo sh -c 'echo "deb $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s | sudo apt-key add -
sudo apt update
sudo apt install ros-noetic-desktop-full
  • Install dependencies

sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential python3-rosdep
  • Install some useful ROS packages (e.g. rviz viewer)

sudo apt-get install ros-noetic-rgbd-launch ros-noetic-image-view rviz
  • Before using any ROS command, some environment variables need to be setup. You can do that by executing setup.bash which ROS provide

source /opt/ros/noetic/setup.bash
  • Initialize ROS and install all ROS dependencies

sudo rosdep init
rosdep update

Using OpenNI2 ROS Wrapper

  • Create the workspace

mkdir -p ~/LIPSToF_ws/src
cd ~/LIPSToF_ws/src
  • Download LIPS ROS wrapper

cd ~/LIPSToF_ws/src
git clone
  • Run launch script

chose launch script according to your camera.

  • for DL

  • for M3

  • for L210/L215

cd ~/LIPSToF_ws
ln -s src/openni2_camera/ .

Rviz Viewer

After camera topic is launched, You can now use Rviz viewer to see video streams or pointcloud.

  • Launch Rviz viewer in terminal

  • Set Fixed Frame from the Displays panel on the left panel to camera_link

  • Click Add on the bottom of Displays panel. Switch to By Topic tab, select /depth_registered > /points > PointCloud2. Then click OK.

  • Now you can see the pointcloud

Last updated