loading

Hooking up a Kinect to your Computer (Using Ubuntu)

Featured
Picture of Hooking up a Kinect to your Computer (Using Ubuntu)
105.png
102.jpg
103-1.jpg
103-2.jpg

I've been watching the Kinect hacks online for the past several months and really enjoyed them. I started thinking recently that I would kind of like to work with it myself, see what kinds of things I might be able to make and do, and decided to get a Kinect to play with.

The first thing I found was that there are a lot of different development platforms that all connect the Kinect to the computer in different ways. I also found out that all of these platforms were in different stages of development, and I don't think any of them are finished.

In the end, I found a lot of information about Kinect 1.2 running under Ubuntu, and felt that this platform gave me the most initial options for immediate enjoyment.

Trying to install, I found that the instructions that are given on the webpage (which are incredibly difficult to find), aren't really helpful in installing them on a computer, so after spending two weeks with google and three computers, I finally feel I've figured out the best way to install the working application. This instructable will be my attempt to convey that information I learned to you!
 
Remove these adsRemove these ads by Signing Up

Step 1: An Operating System

Picture of An Operating System
Ubuntu01.png

For the purpose of this instructable, I installed all of my applications on the current version of the Ubuntu Operating system. So If you head over to ubuntu.com, and download the desktop version of Ubuntu 10.10 either 32 or 64 bit depending on your system hardware and you'll be ready to begin!

[Note: I have not tried this with Ubuntu 11.04 and can therefor not guarantee any of this will work within that OS]

Follow the directions on their page for installing either via a usb thumb drive or a cd (or your own preferred method). Once Ubuntu is installed on your computer, you're ready to move on to step two!

Step 2: Updating your System

Picture of Updating your System

Now that Ubuntu is installed on the system, let's update it. It's no good trying to install thing while there's things being installed in the background. If the option doesn't come up automatically, go to the "System" drop down menu at the top of the screen, scroll your mouse over "Administration", and click on "Update Manager"

After all the updates have been installed, make sure you have whatever graphics driver is required for your graphics card. If you don't have the specific driver for the card, the default recommended by Ubuntu should be fine. A menu should automatically pop up in the upper right hand corner of the screen letting you know there's drivers to install. If that doesn't come up, click the "System" drop down again, "Administration", and then click on "Additional Drivers".

Step 3: An Intro to Terminal

Picture of An Intro to Terminal

Now that all of the system basics are installed and updated, let's get to the good stuff, Terminal!

If you click on Applications (in the top left corner of the main Ubuntu User Interface), drag your cursor down to Accessories, and then click on the Terminal application that pops up, you'll get a window that pops up with the text of your name, the computers name, and a :~$ afterward. This screen is where we're going to install all of our stuff.

apt-get is one of the main commands we're going to us, we use this to get applications over the internet and have them installed for us.

sudo gives us admin privileges on whatever command it precedes. To install things in Ubuntu, you need to have administrative rights, this allows us to have that.

Type, or copy and paste any commands I have in this instructable into Terminal, and hit enter after each one.

The $ indicated a new line.
Don't copy or write the $ in your code, it's already there!
Don't copy anything that has [ ] around it, these are notes to let you know what the code is doing.

Step 4: Time to get Everything Ready to Build your Application

Picture of Time to get Everything Ready to Build your Application
402.png
403.png

I don't think you need to update your apt-get unless you add repositories (which I'm not going to cover here), but on my first run of a system, I like to run it for just in case purposes.

$ sudo apt-get update
[updates your repositories]

$ sudo apt-get install build-essential
[installs a set of applications that allows you to build your own programs and do many other things]

$ sudo apt-get install zlib1g-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev

[Reference Only! In case you're curious the functions of the programs I'm telling you to install, I plan to include a list of links to each application/library/package in each step so you know exactly what it is.
build-essential
zlib1g-dev
mesa-common-dev
libgl1-mesa-dev
libglu1-mesa-dev]

Step 5: Dependancies

Picture of Dependancies

Now that all the prerequisites to building programs are on your computer, we can work on installing all the specific things that are required by the Kinect and Vrui Programs.

Before I give you the commands, I want to let you know what each library is that you're installing.

The lib prefix on each of these items your installing indicate a library. You're installing the libraries associated with specific file formats so that you can use them on your computer.

The -dev at the end of each library let's you know you're installing the development library, each of these has a version without the -dev, but for our purposes, we need to have development access.

Imaging:
png12
jpeg62
tiff4
theora

Audio:
asound2
speex
ogg
openal

General Data:
dc1394-22
bluetooth

I don't think it matters in what order or how many of these you install, but to play it safe, I kept with the original directions.

$ sudo apt-get install libpng12-dev libjpeg62-dev libtiff4-dev libasound2-dev libdc1394-22-dev
$ sudo apt-get install libspeex-dev libogg-dev libtheora-dev libbluetooth-dev libopenal-dev

Step 6: Dependancies Part II


To build programs yourself in a Linux environment, you need to resolve dependancies first. The dependancies are those libraries and packages that the program you're installing depends on to be there. Everything we've done up to this point was to resolve all of those dependency issues so that we can do a nice clean install without running into any problems. Now that everything that will need to be resolved is, let's download the programs we're going to use.

Download Vrui-2.0-003.
[Sadly, I was working on this project pre-version 2.1, which you're welcome to try - but if you do, read the directions that come with it]

In Ubuntu, go to your home folder. If you click on the Places drop down at the top of the screen, you'll see a link to Home Folder.
Create a new folder titled: src [that's src in all lowercase] [right click - and click "Create Folder" to make a new folder]

Double click the downloaded Vrui-2.0-003.tar.gz [it should be in your downloads folder]
This will open up the archive in Archive Manager, you want to unpack what's in the archive into your src folder. So either go back to your folder screen in the background, and find and open your src folder and drag the Vrui-2.0-003 folder out of the archive into that folder. Or, click extract, when the dialog comes up asking were to extract to, locate your home folder (should be your log in name), and once there, double click on src. When Archive Manager has the src folder open, click extract. When it's done, quit.

Step 7: Building and Installing Vrui

Picture of Building and Installing Vrui
702.png
703.png


From here on out, Terminal will need to be in different directories to do different things. To navigate in Terminal, you use cd (which stands for change directory). You can also use ls (list) to see what's in the folder you're currently at.

When you open terminal, it will default you to your home directory. Type in "ls" and you'll see a list of folders and documents that are in your home directory. Since we want to be in the src directory type "cd src" and your directory will change. If we type "ls" again, we'll see that there's only one folder here, let's open it, "cd Vrui-2.0-003". Finally, lets type ls again and see what we have.

If you want to read the read me, you can use the gedit program, type "gedit README". This read me file goes into some of the instructions I have given you here, and tells you how to do some other things you might be interested in (Like linking multiple Kinect's together).

From Terminal, if you ever need to go back to directories you were at, there's two methods. First, you can type "cd" with nothing else, and it will take you back to your home directory. The other method is to type "cd .." and it will only take you back one directory, a nice way of backing out if you several folders in and don't want to have to wade through all the directories again.

So, Now that we have the first program unpacked and in the correct folder, and we know our way around Terminal a little bit, it's time to build the application and install it.

Before we can start though, there's one last library to install. If we don't install libglu-dev we'll get a fatal error when we try to make.

[$ make
error:fatal error: GL/glu.h: No such file or directory]

$ sudo apt-get install libglu-dev

Now that that's complete, it's time to install everything. Go to the /src/Vrui-2.0-003 directory in Terminal, and use the following two commands.

$ make [builds the package that will be installed onto your computer, checks to insure dependancies and workability]
$ make install [installs the package you just built]

Step 8: Check your Install

Picture of Check your Install
802.png
803.png
804.png
805.png

That's it! Vrui is installed! Now let's check it out and make sure it works. Make sure you're still in the /src/Vrui-2.0-003 directory before continuing.

$ cd ExamplePrograms [change your directory to one that has example programs]
$ make [builds the programs so you can try one out]
$ ./bin/ShowEarthModel [opens one of the programs you just built]

Now we can see something, so let's test and ensure Vrui's working!

Controls within the application are as follows: [each command also requires the movement of the mouse]
left mouse - spins object on center of screen
z - pan
z+left mouse - zoom in out
z+left mouse+shift - dolly in and out

Use them to make sure you can navigate throughout the program.

Step 9: Install Kinect-1.2



Step 1:
$ sudo apt-get install libusb-dev
$ sudo atp-get install libusb-1.0-0-dev

Step 2:
Download Kinect-1.2 [Scroll to the bottom of the page]
Unpack Kinect-1.2.tar.gz to src folder [if you don't remember how to do this, look at the last paragraph in Step 6 - Dependancies Part II]
Open Terminal
Go to src, then Kinect-1.2 folder
$ make

Step 3:
$ sudo ./bin/RawKinectViewer > CalibrationData.csv  [if you don't run sudo - can't open USB device - permission denied]

The commands here are the same as they were in Vrui.

Now that they are talking, you just need to calibrate things. There's an excellent video created by the author of this software, detailing exactly how to do that, following this link.

Step 10: Finished!


Now everything is installed, and should all be working. You're Kinect and computer should be talking and you should be able to see what your Kinect sees on your monitors display.

Now you know how to install one type of Kinect Software, but there's a whole lot of other ones on the market. If you managed it through this, and understood why you were doing things, you should have no trouble with any of the other packages if you want to try them out.

With all of this completed, and talking back and forth, now you just have to figure out what you want it to do!  And for that, I leave it up to you.  Though I'll leave you with some things that the author of this software has worked on/is doing.

Best of luck!

Step 11: Additional Information

Picture of Additional Information
_MG_0034.JPG

Since figuring out how to do this, I've installed several different versions of Kinect software on different computers.

OpenKinect (I made another instruction talking about this) and a Processing extension have both been incredibly helpful to me. Both have excellent installation instructions and detailed information on what you can do once installed. I learned a lot about the functionality and what I could really do with the Kinect through the Processing extension.

When I originally started working on this project, I wanted to use multiple Kinects to create 3D rendered models. I choose this application because the author had already used it for such a purpose and provided instructions on how to hook multiple Kinect streams together. I've since found a fantastic demonstration of someone streaming kinect data in real time to Blender.

OpenNI and OpenCV both came highly recommended by friends, though i never got around to using either of them.

If you have any additional suggestions on software or resources, please leave a comment.  I'll do my best to add them to this step so people stumbling upon this in the future have some useful information.

Hi,

I've been working through this tutorial, and it is very helpful and easy to use. However, when I got to step 9, I tried to run the sudo ./bin/RawKinectViewer > CalibrationData.csv command, but got this error:

imehrslab@imehrslab-OptiPlex-9010:~/src/Kinect-2.8-001$ ./bin/RawKinectViewer > CalibrationData.csv
./bin/RawKinectViewer: error while loading shared libraries: libKinect.g++-3.so.2: cannot open shared object file: No such file or directory
imehrslab@imehrslab-OptiPlex-9010:~/src/Kinect-2.8-001$

As you can see, I'm using significantly higher versions of the Kinect software as well as the Vrui, so that could be one cause. I can't use 1.2 however, because I'm using a Kinect-for-Windows model, which apparently needs Kinect 2.8 (or at least it said so in the download page). Any ideas on what could be wrong? Thanks for the help and the great tutorial, I had all kinds of trouble before I found it.

Josh

Hi Moncvan,

Iam stuck up with the same problem t said :"error while loading shared libraries: libKinect.g++-3.so.2: cannot open shared object file: No such file or directory".

It would be great help from your end if u have resolved this issue.

REgards

K S Chidanand Kumar

One more instruction is missing here.
From the kinect folder, after executing make, do execute : make install. After this, you won't get the libKinect error

moncvan3 years ago
Hi, I installed the new version one like the Kinect 2.0 and Vrui-2.2-003 in my Ubuntu terminal cause I need to apply multiple kinects like in the video of youtube: http://www.youtube.com/watch?v=5-w7UXCAUJE

After I followed the instruction above, when I type in inside of folder Kinect 2.0 like
sudo ./bin/RawKinectViewer > CalibrationData.scv

It said :"error while loading shared libraries: libKinect.g++-3.so.2: cannot open shared object file: No such file or directory"

So, what should I do ? Do I have to install another library ? If yes, how?

Thanks

Hai, Did you get this problem solved? I have the same problem.

thnks

Henry.van.gestel@gmail.com

Hi Henry.van.gestel,

Iam stuck up with the same problem t said :"error while loading shared libraries: libKinect.g++-3.so.2: cannot open shared object file: No such file or directory".

It would be great help from your end if u have resolved this issue.

REgards

K S Chidanand Kumar

One more instruction is missing here.
From the kinect folder, after executing make, do execute : make install. After this, you won't get the libKinect error

azad.soni.1807 months ago

thank you very much. it helped us very much. nice, simple, step wise.

thanks a lot man again. we were struck on it for a while and getting to this solved it all.

AndrásT10 months ago

Hi! I stumbled upon this tutorial, and this was the one which helped me make a Kinect for Windows work, so I really appreciate your work here. I did it on Lubuntu 12.04, and I would add the following: Both from the Vrui and the Kinect you will need the latest versions, or at least previous versions of Vrui did not compiled for me, and the fresh .sh "installer" did not run properly, too. Also, I have a Kinect for Windows, which is not supperted by Kinect only in the 2.8 version (according to its comment).

Thanks again!

Hey man, great guide, but I am a little stuck. I have downloaded everything as you said, word for word, but I keep getting this bunch of errors:
In file included from /home/metalshadow/src/Vrui-2.0-003/Misc/TimerEventScheduler.h:28:0,
from /home/metalshadow/src/Vrui-2.0-003/GLMotif/ScrollBar.h:28,
from GLMotif/ScrollBar.cpp:23:
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:115:24: error: declaration of ‘operator+=’ as non-function
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:115:21: error: expected ‘;’ at end of member declaration
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:115:31: error: expected ‘)’ before ‘increment’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:120:22: error: ‘size_t’ has not been declared
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:128:2: error: ‘size_t’ does not name a type
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:131:2: error: ‘size_t’ does not name a type
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:135:18: error: ‘size_t’ has not been declared
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:157:22: error: expected ‘)’ before ‘sAllocSize’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:212:2: error: ‘size_t’ does not name a type
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h: In member function ‘void Misc::PriorityHeap::reallocate(int)’:
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:138:3: error: ‘allocSize’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:143:7: error: ‘size_t’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:143:7: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:155:26: note: ‘std::size_t’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:143:14: error: expected ‘;’ before ‘i’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:143:18: error: ‘i’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:143:20: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h: In copy constructor ‘Misc::PriorityHeap::PriorityHeap(const Misc::PriorityHeap&)’:
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:164:4: error: class ‘Misc::PriorityHeap’ does not have any field named ‘allocSize’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:165:22: error: ‘allocSize’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:166:4: error: class ‘Misc::PriorityHeap’ does not have any field named ‘numElements’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:169:7: error: ‘size_t’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:169:7: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:155:26: note: ‘std::size_t’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:169:14: error: expected ‘;’ before ‘i’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:169:18: error: ‘i’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:169:20: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h: In destructor ‘Misc::PriorityHeap::~PriorityHeap()’:
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:175:7: error: ‘size_t’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:175:7: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:155:26: note: ‘std::size_t’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:175:14: error: expected ‘;’ before ‘i’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:175:18: error: ‘i’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:175:20: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h: In member function ‘Misc::PriorityHeap& Misc::PriorityHeap::operator=(const Misc::PriorityHeap&)’:
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:187:8: error: ‘size_t’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:187:8: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:155:26: note: ‘std::size_t’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:187:15: error: expected ‘;’ before ‘i’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:187:19: error: ‘i’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:187:21: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:191:7: error: ‘allocSize’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:201:4: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:202:15: error: expected ‘;’ before ‘i’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:202:19: error: ‘i’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h: In member function ‘bool Misc::PriorityHeap::isEmpty() const’:
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:210:10: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h: In member function ‘Misc::PriorityHeap::Iterator Misc::PriorityHeap::end()’:
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:222:24: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h: In member function ‘Misc::PriorityHeap& Misc::PriorityHeap::insert(const Content&)’:
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:226:6: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:226:19: error: ‘allocSize’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:230:3: error: ‘size_t’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:230:3: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:155:26: note: ‘std::size_t’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:230:10: error: expected ‘;’ before ‘insertionPos’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:231:10: error: expected ‘;’ before ‘parent’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:232:6: error: ‘insertionPos’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:232:50: error: ‘parent’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:256:5: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h: In member function ‘Misc::PriorityHeap& Misc::PriorityHeap::reinsertSmallest()’:
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:271:3: error: ‘size_t’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:271:3: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:155:26: note: ‘std::size_t’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:271:10: error: expected ‘;’ before ‘insertionPos’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:274:11: error: expected ‘;’ before ‘child1’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:275:11: error: expected ‘;’ before ‘child2’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:276:11: error: expected ‘;’ before ‘minIndex’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:277:7: error: ‘child1’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:277:14: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:277:55: error: ‘minIndex’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:279:7: error: ‘child2’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:279:14: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:279:55: error: ‘minIndex’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:281:7: error: ‘minIndex’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:281:17: error: ‘insertionPos’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:283:20: error: ‘insertionPos’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:283:39: error: ‘minIndex’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h: In member function ‘Misc::PriorityHeap& Misc::PriorityHeap::removeSmallest()’:
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:291:3: error: ‘size_t’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:291:3: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:155:26: note: ‘std::size_t’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:291:10: error: expected ‘;’ before ‘insertionPos’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:294:11: error: expected ‘;’ before ‘child1’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:295:11: error: expected ‘;’ before ‘child2’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:296:11: error: expected ‘;’ before ‘minIndex’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:297:7: error: ‘child1’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:297:14: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:297:55: error: ‘minIndex’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:299:7: error: ‘child2’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:299:14: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:299:55: error: ‘minIndex’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:301:7: error: ‘minIndex’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:301:17: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:303:9: error: ‘insertionPos’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:303:28: error: ‘minIndex’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:306:5: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:307:8: error: ‘insertionPos’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h: In member function ‘Misc::PriorityHeap& Misc::PriorityHeap::remove(const Misc::PriorityHeap::Iterator&)’:
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:315:3: error: ‘size_t’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:315:3: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:155:26: note: ‘std::size_t’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:315:10: error: expected ‘;’ before ‘insertionPos’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:318:5: error: ‘numElements’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:321:9: error: ‘insertionPos’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:323:11: error: expected ‘;’ before ‘parent’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:324:34: error: ‘parent’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:326:28: error: ‘parent’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:331:9: error: ‘insertionPos’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:333:11: error: expected ‘;’ before ‘minIndex’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:334:11: error: expected ‘;’ before ‘child’
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:335:7: error: ‘child’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:335:55: error: ‘minIndex’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:337:6: error: ‘child’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:338:55: error: ‘minIndex’ was not declared in this scope
/home/metalshadow/src/Vrui-2.0-003/Misc/PriorityHeap.h:340:28: error: ‘minIndex’ was not declared in this scope
make: *** [o/g++-3.g0.O3/GLMotif/ScrollBar.o] Error 1
is there any easier way to do this or i have to follow this long and complex procedure
I would strongly recommend against these instructions at this point actually. I did this when there really wasn't that much information on the subject. Check the last step (11).

Click the links to processing for something that is super easy to install and get working straight away. OpenKinect has it's own installation instructions, but they're a little more in depth then I remember the Processing plugin being.

Best of luck!
maarige3 years ago
thanku very much for the tutorial....

every thing was working fine before i reached the step to MAKE the Kinect 1.2 and got the following error...

Compiling USBContext.cpp...
USBContext.cpp:25: fatal error: libusb-1.0/libusb.h: No such file or directory
compilation terminated.
make: *** [o/USBContext.o] Error 1

i can't understand where it looks for 'libusb' file....
waiting for ur reply
thanks in advance
StumpChunkman (author)  maarige3 years ago
I'm really sorry. I tried searching around the web a bit, but wasn't able to find anything. Since I don't use my Kinect anymore, so I'm not sure what this error is.

Please ensure that you download the exact items I mentioned (most of them have been updated since I wrote this), and follow the steps exactly. I know this works, because I've had to use it several times to reinstall Kinect software on my computer.

Since everything has been updated though, I'm not sure if someone changed their code or not. I'm really sorry I can't be of more help.
thanks for reply....

one more thing i would like to ask is that what is the purpose of Vrui while using Kinect????

regards
StumpChunkman (author)  maarige3 years ago
And one other shorter (more concise) bit of info on the topic.
StumpChunkman (author)  maarige3 years ago
Of course. Sorry I couldn't be of more help.

I only linked to the download page of Vrui in my instructable. Here's the main page which tells you all about it.
microbot3 years ago
StumpChunkman, has anyone told you that you rock today?

I was slightly frustrated for a bit there. I reckon the problem is disorganization on my part. I have been able to get point cloud and ir camera data out of the kinect after 15 minutes of playing around. For the last two weeks have read sooo many tutorials. and followed like five of them. ROS file system, openNI, etc. I want to do finger/gesture tracking. I confused myself pretty well on what talks to what and by what mechanism. i wiped the box and started from scratch. Found an Engineers checklist, and started over again. Documenting my steps...

Here is the manual: http://www.guymacon.com/ENGINEER/PLANNING/INDEX.HTM


On to tracking environmental variables!

Thanks Bud!
StumpChunkman (author)  microbot3 years ago
Awesome! I'm glad to hear you got it working!

That's pretty much the exact same problem I had when I first started trying to work with the Kinect. Every guide I found was useless, or left out a ton of information that I needed.

After trying and failing quite a few times, I finally decided that when I eventually got it working, I'd document my progress so other people could replicate it.

It's really annoying when you find directions online that leave out really important details.

Happy hacking!
microbot3 years ago
Thanks for the reply Stumpchuck.

I re-read your instructions, decided to follow them directly, with the same versions of Vrui and everything else. Yeah! I at least have a different error. I feel like its some kind of dependency , as it refers to a file that is missing.
I found the ValueSource.h file. My problem is that I do not have a proper education in Xnix. I am on Ubuntu, Natty. for the last ten months. I know windows systems throughly. Does not appear to help much, hehe.

me@Computer:~/src/Kinect-1.2b$ make
Compiling KinectCamera.cpp...
KinectCamera.cpp:32:28: fatal error: IO/ValueSource.h: No such file or directory
compilation terminated.
make: *** [o/KinectCamera.o] Error 1

Again, thanks for your time.
StumpChunkman (author)  microbot3 years ago
It looks like you have kinect-1.2b. Try just straight up kinect-1.2

I'd be nice to be able to see your computer, sorry I'm not incredibly helpful from this side.
microbot3 years ago
I should have used my eyes a little better. I found that "the VRUIDIR variable at the top of Kinect-1.2's makefile needs to be changed, to $(HOME)/Vrui-2.0-001 or $(HOME)/Vrui-2.0-002, respectively" - so I changed that, now I get this error:


me@ocmputer:~/src/Kinect-1.2a$ make
Compiling KinectCamera.cpp...
KinectCamera.cpp: In static member function ‘static void KinectCamera::StreamingState::transferCallback(libusb_transfer*)’:
KinectCamera.cpp:233:53: error: no matching function for call to ‘Threads::MutexCond::signal(Threads::MutexCond::Lock&)’
/home/me/Vrui-2.2/include/Threads/MutexCond.h:97:7: note: candidate is: void Threads::MutexCond::signal()
make: *** [o/KinectCamera.o] Error 1
StumpChunkman (author)  microbot3 years ago
Awww...this one is way more difficult then the last one! I need to download and try to install everything to see what's going on. That's why I haven't gotten back to you yet.

Hopefully I have some time this weekend. I'm not sure I'll know what's causing this problem exactly though.
microbot3 years ago
Hi, StumpChunkman.
I really like your guide.
I am stuck at make on "Go to src, then Kinect-1.2 folder".
I am sure it is because I am new to linux. I guess I just don't fully get it yet.

Here is my terminal output: me@Computer:~/src/Kinect-1.2b$ make
makefile:49: /home/me/Vrui-2.1/share/Vrui.makeinclude: No such file or directory
make: *** No rule to make target `/home/me/Vrui-2.1/share/Vrui.makeinclude'. Stop.

I have Vrui-2.2-001 installed, I know some of the packages changed, nevertheless I am not sure how to handle this. Any help would be greatly appreciated.

Thanks again,
Microbot

rread3 years ago
Thank you so much for this very clearly written instructable. I'm writing this from ubuntu, I have never read such a good description of what is going on in terminal. just followed blindly and got lucky in the past.

I hope to eventually build a similar system to the kinect +++ in order to control kites by computer... eventually for power generation.
Once I nail it I'll get you the instructable back. Hopefully as clear as this one.
StumpChunkman (author)  rread3 years ago
That sounds awesome! I'm looking forward to seeing it!
ok... here's the concept ... And it's kicking off
https://sites.google.com/site/kitepowerresearch/
tzsch rread3 years ago
Wow, super awesome idea!
kpolzounov3 years ago
Just a suggestion if your new to linux you should use Zorin OS instead of ubuntu (a modded vesion of ubuntu) and its much easier to install it on a flash drive using unetbootin :) just a helpful tip
StumpChunkman (author)  kpolzounov3 years ago
Interesting. I'd never heard of Zorin before, it looks interesting.

I've been using one distro or another for the better part of a decade and finally decided that Ubuntu was the most comfortable fit for me. Which is why I was so irritated when they completely revamped their desktop environment. After swapping distro's again for gnome 3, I realized that it was just the way desktops are going and got used to it. I finally put Ubuntu back on and it seems pretty confortable. There are still a few things that bug the hell out of me (like not being able to control certain aspects of your sidebar)...but I'm willing to look past that for now.

Thanks for the heads up though, that Look Changer program would have been handy about 10 years ago!
locofocos3 years ago
Nice. I tried to get my Kinect running in Ubuntu 11.04, but got caught up in all the dependencies and other things that needed to be compiled from source (which weren't in Synpatic). Do you think there's any way your setup could be used with https://github.com/petermoz/keyboard-anywhere? It lets you play a virtual piano with the Kinect.
StumpChunkman (author)  locofocos3 years ago
That took a little longer then expected, but I finished and found a much easier way then I did it previously. You can find instructions here. Let me know if you have any more questions!
StumpChunkman (author)  locofocos3 years ago
Actually, the images you see in the last step shows my foray into keyboard-anywhere. I took his code and re-purposed it for what I was doing. If you just want to use the default sounds that he has, install OpenKinect with the python wrapper. You'll run into a ton of issues, but I promise it works. I'll try to put up a forum topic this weekend that deals with that (hopefully I have some time).
XTL3 years ago
" my grandma's PC she was throwing away(in last picture bubble)
OMG - time is moving so quickly. my mother still refuses to have one and his grandmother is throwing her old one out. LOL