-
Notifications
You must be signed in to change notification settings - Fork 10
Integrating Kinect for windows v2 with ROS
#1. Introduction This a walk through on how to integrate Kinect for Windows v2 with ROS system using the software package developed at Personal Robotics Lab of Carnegie Mellon University. The package currently supports the following streams:
- 1920 x 1080 RGB
- 512 x 424 Depth Image
- 512 x 424 IR image
- Body frames
- Audio stream and bearing of the source
#2.System Architecture The system consists of two pieces. The first piece consists of the kinect v2 and a computer running windows 8.1 that reads the data stream from the kinect and dumps it over the network. The second piece of the system is linux machine running ROS nodes which read the data stream and publish appropriate ROS topics.
Both the pieces of software can be found at following locations
#3. Hardware requirements ##3.1 Windows machine
Any machine running windows 8.1 on a Intel core i series CPU with 4GB of memory, 1 USB-3.0 and 1 Ethernet port will suffice. A recommended purchase would be an Intel NUC with core i5 and 4GB of RAM.
##3.2 Linux machine
Any machine running Ubuntu 12.04 or above with ROS Fuerte and at least 1 Ethernet port will do the trick.
##3.3 Kinect for Windows v2
The software works only with Kinect for windows v2.
#4. Procedure
##4.1 Setting up windows machine
The windows part of the setup can be done in two ways. You can either build from source or use pre-built binaries. You need to follow only one of sections 4.1.1 and 4.1.2 to setup your windows machine. Building from source offers more flexibility to tweak the code, while using pre-built binaries lets you get started quickly without having to do install a lot of software.
###4.1.1 Build from source
-
Install windows as you would on a regular machine.
-
Download and install Microsoft Visual Studio Express 2013 for Windows Desktop from here. Make sure to download the version for Windows desktop and not others.
-
Download and install the kinect SDK from here
-
Download the k2_server software from here and extract it to any location of your choice. Ensure that you have downloaded the source files.
-
Connect the Kinect to the USB-3.0 port of the windows machine and start one of the sample applications to check if everything is working. If the sample don't run, refer to MSDN for troubleshooting tips. Once done, close all the kinect applications.
-
Disable IPv6 on the machine by following the instructions on this page.
-
Start Visual Studio Express 2013 and open the k2_server project that you downloaded in step no.4.
-
Select build option from the build menu to compile the code.
-
To run, simply click on start button or run the kinect2server.exe executable from the folder "Your_sofware_location \ k2_server \ kinect2server \ bin \ (appropriate folder based on build settings)"
###4.1.2 Use pre-built binaries
-
Install windows as you would on a regular machine.
-
Download the binaries from here and extract it to any location of you choice. Ensure that you have downloaded the binaries and not the source.
-
Disable IPv6 on the machine by following the instructions on this page.
-
(optional) For convenience, create a desktop shortcut of kinect2server.exe file from the extracted folder.
-
Start the application. A kinect logo in the notification tray denotes that the application is active.
##4.2 Setting up Linux machine
-
Download the k2_client package from here.
-
Before you can use the k2_client package, you need to install libjsoncpp-dev. Use the following code snippet for it.
sudo apt-get update
sudo apt-get install libjsoncpp-dev
- Move the k2_client package to your ros workspace or add its location the ROS_PACAKGE_PATH environment variable by adding the following line at the end of ~/.bashrc
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/TO/PACKAGE/THE/PACKAGE
- Edit the value of the parameter "serverNameOrIP" with the IP address or name of your windows machine which runs the server software. The rosmake the package by using following commands
roscd k2_client
rosmake
- Start all the ROS nodes by running the following command. Make sure that the roscore is running and the environment variable $ROS_MASTER_URI points to it.
roslaunch k2_client kinect2Client.launch
By now, you must have given awesome new eyes to the perception system of your robot.