This post is in reply to answers.ros.org user Nimisha who asked:
"...I am trying to interface kinect to ROS indigo and am facing similar problems. Could you please tell me the entire procedure all over[sic] so that i could know where i am going wrong."So here is the way I did it:
- I uninstalled all copies of openni/openni2 from my computer with this command
sudo apt-get remove ros-indigo-openni*
- Then I installed the all of the freenect tools that are on ROS with this command
: sudo apt-get install ros-indigo-freenect*
- Now I was ready to install the Avin2/SensorKinect drivers from github. Note: these are made to work with openni which I just removed, but they seem to work for freenect also.
- I went to the Avin2/SensorKinect github repository and followed the install instructions. Since I was using linux I used these instructions:
Linux: Requirements: 1) GCC 4.x From: http://gcc.gnu.org/releases.html Or via apt: sudo apt-get install g++ 2) Python 2.6+/3.x From: http://www.python.org/download/ Or via apt: sudo apt-get install python 3) OpenNI 1.5.x.x From: http://www.openni.org/Downloads/OpenNIModules.aspx Building Sensor: 1) Go into the directory: "Platform/Linux/CreateRedist". Run the script: "./RedistMaker". This will compile everything and create a redist package in the "Platform/Linux/Redist" directory. It will also create a distribution in the "Platform/Linux/CreateRedist/Final" directory. 2) Go into the directory: "Platform/Linux/Redist". Run the script: "sudo ./install.sh" (needs to run as root) The install script copies key files to the following location: Libs into: /usr/lib Bins into: /usr/bin Config files into: /usr/etc/primesense USB rules into: /etc/udev/rules.d Logs will be created in: /var/log/primesense To build the package manually, you can run "make" in the "Platform\Linux\Build" directory. Important: Please note that even though the directory is called Linux, you can also use it to compile it for 64-bit targets and pretty much any other linux based environment. Building Sensor using a cross-compiler: 1) Make sure to define two environment variables: -
_CXX - the name of the cross g++ for platform - _STAGING - a path to the staging dir (a directory which simulates the target root filesystem). Note that should be upper cased. For example, if wanting to compile for ARM from a x86 machine, ARM_CXX and ARM_STAGING should be defined. 2) Go into the directory: "Platform/Linux/CreateRedist". Run: "./RedistMaker " (for example: "./RedistMake Arm"). This will compile everything and create a redist package in the "Platform/Linux/Redist" directory. It will also create a distribution in the "Platform/Linux/CreateRedist/Final" directory. 3) To install OpenNI files on the target file system: Go into the directory: "Platform/Linux/Redist". Run the script: "./install.sh -c $ _STAGING" (for example: "./install.sh -c $ARM_STAGING"). The install script copies key files to the following location: Libs into: STAGING/usr/lib Bins into: STAGING/usr/bin Config files into: STAGING/usr/etc/primesense USB rules into: STAGING/etc/udev/rules.d Logs will be created in: STAGING/var/log/primesense To build the package manually, you can run "make PLATFORM= " in the "Platform\Linux\Build" directory. If you wish to build the Mono wrappers, also run "make PLATFORM= mono_wrapper" and "make PLATFORM= mono_samples".
Excerpted from README.md from https://github.com/avin2/SensorKinect.That was all I had to do to get it to work. Now I ran roslaunch freenect_launch freenect.launch and it connected to my Kinect. I hope that answers your question, Namish! Good luck with your Kinect!