Set up OpenNI tracker in ROS Indigo

Please note that this has only been tested in Ubuntu 14.04 64 bit with ROS Indigo and Microsoft Kinect 360. It is assumed that you already have ROS Indigo installed. If not, then follow this link for installation of ROS Indigo.

First we have to install some peripheral Libraries:

sudo apt-get install git-core cmake freeglut3-dev pkg-config build-essential libxmu-dev libxi-dev  libusb-1.0-0-dev openjdk-6-jdk doxygen graphviz mono-complete

OpenNI

Download the OpenNI package

mkdir ~/kinect
cd ~/kinect
git clone https://github.com/OpenNI/OpenNI.git

Compile the package using the Redist-System

cd OpenNI/Platform/Linux/CreateRedist/
chmod +x RedistMaker
./RedistMaker

Next, Install OpenNI:

cd Final
tar -xjf OpenNI-Bin-Dev-Linux-x64-v1.5.7.10.tar.bz2
cd OpenNI-Bin-Dev-Linux-x64-v1.5.7.10
sudo ./install.sh

SensorKinect

This part is similar to the installation of OpenNI package.

Download the package:

cd ~kinect/
git clone git://github.com/ph4m/SensorKinect.git

Compile package using Redist-System:

cd SensorKinect/Platform/Linux/CreateRedist/
chmod +x RedistMaker
./RedistMaker

Installation:

cd Final
tar -xjf Sensor-Bin-Linux-x64-v5.1.2.1.tar.bz2
cd Sensor-Bin-Linux-x64-v5.1.2.1
sudo ./install.sh

NITE

Please note that only the Versions NITE v1.5.2.21 and NITE v1.5.2.23 will work for you. Paste the nite-folder into your kinect-folder to keep track of your data:

cd ~kinect/nite/
tar -xjf NITE-Bin-Dev-Linux-x64-v1.5.2.23.tar.bz2
cd NITE-Bin-Dev-Linux-x64-v1.5.2.23
sudo ./install.sh

Now that everything around ROS is installed, we should reboot the system:

sudo reboot

ROS Components

After we have installed all peripheral Libraries, we can install the required ros-core-components for OpenNI-usage. But we have to delete one library before that because of some issues that will appear otherwise:

sudo apt-get remove libopenni-sensor-pointclouds0

Next is the installation of ROS-Kinect Driver:

sudo apt-get install ros-indigo-openni-launch
sudo apt-get install ros-indigo-openni-camera

Finally we can install the openni_tracker to our usually workspace (for example the catkin_ws):

cd ~catkin_ws/src
git clone https://github.com/ros-drivers/openni_tracker.git 
cd ..
catkin_make

Now that the OpenNI tracker is installed, you’ll be able to track skeleton of a person and view it in Rviz. You’ll be needing several terminals to work with OpenNI Tracker.

Terminal 1:

roslaunch openni_launch openni.launch

Terminal 2:

roslaunch openni_tracker openni_tracker

Terminal 3:

rosrun rviz rviz

To view the skeleton frame in Rviz, set the base link from map to openni_depth_frame and add a TF component.

Thanks to Don Bastiano for coming up with this.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s