Osx Curl



$ sudo apt-get install autoconf automake curl flex g gcc gdb git krb5-admin-server krb5-kdc krb5-user libkrb5-dev libsasl2-dev libsasl2-modules libsasl2-modules-gssapi-mit libssl-dev libtool lsb-release make ntp openjdk-8-jdk openssl patch pkg-config python rsync unzip vim-common. MAC OSX v10.11 and later; 512MB of RAM (1GB recommended) System requirements (Windows) 32 / 64 Bit; 2.33GHz or faster x86-compatible processor, or Intel Atom™ 1.6GHz or faster processor for netbook class devices; Windows 7 and later. Jul 17, 2016 Get the password of the wifi you're on (bash). Contribute to rauchg/wifi-password development by creating an account on GitHub.

Notice: MediaWiki has been updated. Report any rough edges to marcan@marcan.st

Language:Englishfrançaisitalianoportuguês do Brasil
  • 2Linux
    • 2.1Ubuntu/Debian
      • 2.1.3libtisch PPA
    • 2.5Manual Build on Linux
  • 3OS X
    • 3.3Homebrew
  • 4Windows
    • 4.1Manual build from source

Please read this before you start

This page documents how to get started using OpenKinect. The libraries are very much in flux and this won't be the final process. This also means these instructions might be out of date with the latest commits. You may also want to take a look at the following for more information:

  • the github project top README (don't forget other readme files in the project tree for specific components)
  • the Wrappers section
  • the OpenKinect mailing list
  • the FAQ

Support

For support requests in the OpenKinect irc channel or in the mailing list, please specify the platform you are using, the version of the software you are trying to build or install, and information about the context etc. as explained here.

The adapter

The Kinect needs its own power source which is independent from the USB connection to work on a computer. The latest Xbox360 can power the Kinect directly but the older Xbox requires an adapter for that purpose. Therefore, the Kinect which is bundled with the Xbox360 doesn't include an adapter whereas the Kinect which is sold separately does. The adapter is sold here. This adapter is required to use the Kinect hardware on your computer with libfreenect.

Fakenect

It is also possible to use the Fakenect utility which is a libfreenect simulator/mock interface to run the Kinect demos without having a Kinect.

Thank you!

Linux

Ubuntu/Debian

Official packages

Starting from Ubuntu 11.10 (Oneiric) and Debian 7 (Wheezy), Ubuntu and Debian provide official packages of libfreenect. You can install them easily in a console:

In Ubuntu 12.04 the gspca kernel driver prevent libfreenect from claiming the Kinect device in user-mode.Either remove and blacklist the module

or install a recent versions of libfreenect that can automatically detach the kernel driver by adding Florian Echtler libtisch PPA (see below) with updated libfreenect packages for Ubuntu 12.04.

The freenect device is accessible to any user belonging to the group 'plugdev'. By default, a desktop user belongs to the plugdev group but if you need to add them to the group:

then log out and log in again

NeuroDebian repository

If you want a recent version of libfreenect no matter which version of Debian or Ubuntu you use, backports of the latest release of libfreenect for all supported version of Debian and Ubuntu (namely Ubuntu Lucid(10.04), Maverick (10.10), Natty (11.04), Oneiric (11.10) and Debian Squeeze and Wheezy at the time of writing) are available on NeuroDebian repository (http://neuro.debian.net). The packages available there are created by the maintainers of the official Debian package and follows the standards of Debian/Ubuntu.

To enable the NeuroDebian repository:

Osx Curl

Installing libfreenect is the same as before:

Make sure your user belongs to the plugdev group (The default for a desktop user) to access the device without the root privileges. If it is not the case, add them by:

and log out and log in again

Osx Curl Proxy

libtisch PPA

An Ubuntu launchpad ppa for Lucid(10.04), Maverick (10.10), Natty (11.04), Oneiric (11.10) and Pangolin (12.04) is available at:

to use it, open a console and execute:

After that, you can use:

This will install libfreenect, the development headers, and the demo applications.

After that, you need to add yourself to the 'video' groupand log back in. The package already includes the necessary rulesfor the udev daemon so that accessing the device will be possiblefor users in the group video.

be sure to log out and back in. You don't need to reboot,just plug in the kinect device right now (if it was already connected,unplug and plug back in).


To start the demo applications use:

Problems with accessing device

In case of problems, run

which should list 3 devices

If they are not present, run

and reconnect Kinekt and `Kinect Camera` should be listed

You find all demo applications starting with the freenect- prefix.

Ubuntu Manual Install

Quick copy-paste instructions to get up-and-running instantly:

Note: If you getting an error saying apt-get cannot find libglut3, you might be on a newer version of Ubuntu that has freeglut3-* instead of libglut3-*, so your initial apt-get install would look like:

To use Kinect as a non-root user do the following:

Also make a file with rules for the Linux device manager:

Copy and paste:

Be sure to log out and back in.

If you can't access or still need root privileges to use your device: in some cases there might be conflicts between permissions of two drivers installed (libfreenect and primesense). If this is your case, try reinstalling primesense's sensor driver and keep only primesense's rules file /etc/udev/rules.d/55-primesense-usb.rules, removing the /etc/udev/rules.d/51-kinect.rules file if you created it.

Osx Curl

Fedora

Install libfreenect:

Restart system and run:

Gentoo

Use layman to install tatsh-overlay and emerge dev-libs/libfreenect.

Get layman:

Install the overlay, unmask, and install (replace ~amd64 with ~x86 if on x86):

Add yourself to the video group

By default, only the C synchronous library and C++ library is installed.

USE flags:

  • audio - Enable audio support
  • cpp - Install the C++ header
  • c - Install the C synchronous library
  • examples - Install the examples
  • fakenect - Install the fakenect example
  • opencv - Install the OpenCV example
  • python - Install the Python library

Manual Build on Linux

these instruction need more work, mostly taken from README.asciidoc
Works on CentOS 5.6 x86_64

Install dependencies

For compiling, you need to have the following libs/programs installed. Note these package names seem to be geared toward Ubuntu/Debian.

APT users: (Works on Ubuntu 10.10)

For Ubuntu 13.04, use this instead (replaced libglut3 with freeglut3):


For a non-developer install of RedHat/Fedora/CentOS using yum/rpms, the following command should install most of the packages needed to retrieve, compile, & run the glview demo:

For Fedora 19 you can install the following packages to avoid manually installing libusb:

If you want to enable python in the config, you need to install in Fedora 19:

If you don't see these packages, you will need to add RPMforge as a repository

RPMforge
RPMforge for CentOS

Clone libusb-1.0 Repo and Configure Makefile

If you can not find a pre-built distribution of libusb-1.0, you will need to build it yourself.

If you get the error:

Then you need to create the m4 directory and rerun ./autogen.sh

Build libusb-1.0

Clone libfreenect Repo

If you get the error:

Your SSL Certificate Authority (CA) root certificates are out of date. The following will install the latest version of Mozilla's CA certificate bundle. More info at:
http://curl.haxx.se/docs/caextract.html
http://curl.haxx.se/docs/sslcerts.html

Build libfreenect

Inside the ccmake editor, press c to configure
Using the arrow keys, move to line with LIBUSB_1_INCLUDE_DIR
Press enter to edit the line, then change it to /usr/local/include/libusb-1.0
Press enter when finished editing
Press c to continue configuring
If everything is correct, you will now get an option to press g to generate and exit
Now continue building:

If you get the error:

Then copy libfreenect.pc file into src directory and reinstall:

Errors

If you run into into the following cmake error:

Then you need to install libxi-dev and libxmu-dev/libxmu-headersIf you are using Ubuntu 10.04 or 11.04, type the command: sudo apt-get install libusb-1.0-0-dev libxmu-dev libxi-dev

If you are using Ubuntu 11.04, GLUT_Xi_LIBRARY might still not be found, although it's installed. A workaround for this is to create a symlink:

If glview gives a shared library error:

You need to refresh your ldconfig cache. The easiest way to do this is to create a file usr-local-libs.conf (or whatever name you wish) with the following lines:

Switch to root account and move it to /etc/ld.so.conf.d/usr-local-libs.conf. Then update the ldconfig cache:

Python

To compile the Python wrappers you'll need the package 'python-dev' and cython. The cython package included in Ubuntu 10.10 seems to be broken (see this), get it here or try

For more information about the Python wrappers see this page.

Use as normal user

To be able to access the Kinect you need to add yourself to the video group and change the permission on the created device.

create a file: /etc/udev/rules.d/66-kinect.rules

and add yourself to the video group:

Testing the Kinect

You need to do this as root (or use sudo) if you did not follow the 'Use as normal user' steps.

or

OS X

It is best to install (at least the prerequisites) via a package manager. If you're not already using macports or fink, try Homebrew as we actually have a full package created for this.

MacPorts

Current versions of MacPorts need to support several different versions of libusb. Originally this required a special libusb-devel port that builds the patched libusb library required by the Kinect, but these patches have since been integrated upstream, so the regular libusb port works now.

After installing MacPorts, issue the commands:

Then change to a working directory, and you're ready to:

and continue as per the Manual Build under OSX section. The libusb found by cmake will be correct and already-patched, greatly simplifying the build process!

Fink

You can install libfreenect itself and everything it needs using Fink alone. After installing Fink, issue the following command:

You can try beta releases of libfreenect from the Fink unstable branch:

Or if you want to use the libfreenect code directly from the source, you can skip installing 'libfreenect' if you want to build from source:

and continue as per the Manual Build under OSX section.

Homebrew

If you dont have Homebrew already, it is quite simple to install.

Note: Even if you already have homebrew, make sure to update your formulas (run `brew update`), before trying to install libfreenect as there has been a lot of bugfixing to cmake lately.

Install

And thats it, you are done! A copy of glview demo should now be in your PATH so you can simply run:

to confirm everything worked out ok.

Manual Build under OSX

Prerequisites:

Linux Curl Alternatives

  • git
  • cmake (Can be obtained via MacPorts or from http://www.cmake.org/cmake/resources/software.html)

Next create fetch the OpenKinect repository and libusb:

You don't need to fetch and patch libusb if you already installed libusb-devel via MacPorts (see above)!If you cloned libusb via github you will need to patch it for OpenKinect like so:

and configure OpenKinect:

Don't worry if it shows you an 'Empty Cache' at startup. Now press 'c' in ccmake to configure it.If you already installed libusb via MacPorts or Homebrew, it will work fine. Otherwise it will likely fail, because it cannot find libusb. Press 'e' to exit help and manually edit the path to libusb in the following screen to point to /usr/local/include/libusb-1.0/ and continue.

When you're done, build OpenKinect:

If you want to build OpenKinect as an Xcode project, instead do:

And you're done! There now should be a program called 'glview' in libfreenect/build/bin. Connect your Kinect and start it! If you run into 'ld: warning: in /usr/local/lib/libusb-1.0.dylib, missing required architecture x86_64' when using make, you have to correct the paths with cmake: They have to point to /opt ... when libusb was installed via MacPorts.

To have the files globally available on your Mac and to use them with your own projects, you may install them:

If you have problems with linking:

you have to change the rpath of each libfreenect lib:

Parallel usage with pyusb

If you also want to use pyusb to play with the Kinect, you will need libusb-1.0.8 (it seems). Install it via homebrew and then define the _lib variable before finding the usb device:

Windows

Linux curl options

If you are looking for a showcase of the project's features before compiling, you could take a look at this precompiled demo (source is available as well) which uses libfreenect and opencv.

Manual build from source

Introduction

Building from source shouldn't require any specific expertise but may yet be challenging for some. This introduction will serve to give those who need it a bit of background as to what we're trying to do here. To summarize, you will be downloading the latest libfreenect source and separate dependencies. The dependencies will be used twofold. First, you will copy .dll files to your system where they can be accessed. Secondly, you will link .lib and header files to the source code using the cmake-gui program in order to configure the project and generate the makefiles required for compiling. Finally, you will bring the configured project to your integrated development environment (ex. Visual Studio 2010) for compiling proper or to start your own development. So you should understand from this that your system needs some libraries to run the project demos just like any other piece of software usually does (and .dll files are used for this) and that before this can happen the project itself needs links to libraries and headers to build properly. Note that the resulting compiled libfreenect is itself a dll library which your computer will need to access in order to run the glview.exe demo for example. All of this should become quite clear as you go through the steps.

Getting the source files

There are 2 ways to get the latest source:

Osx Curl
  1. Go to the OpenKinect project github, select the branch you want (master or unstable for instance - see below) and click the 'Download' button (then extract the files to a convenient location) or
  2. Use Git to create and keep an up to date project folder and access any branch locally:

Using Git

Osx
  • Download and install Git with these settings:
    • Accept the license etc.
    • Choose the level of shell integration you want
    • Choose 'Run git from the Windows Command prompt'
    • Choose 'Check out WIndows style, commit Unix-style line endings'
  • Open a Command Prompt, cd to the directory where you want the source folder (/libfreenect) created and type:
  • The contents of the libfreenect folder will interactively change as you checkout a specific branch (magic!) so you don't need to search for a specific 'branch' folder inside the libfreenect directory. Just checkout the branch you want to configure and proceed using the libfreenect folder as source in cmake. This setup allows you to easily switch between the master and unstable branch, update the source files and then configure the branch you want to build.
  • The 'git branch' command will show you the different branches (here master and unstable) and which one is currently selected. You can also view the development logs for the branch you're checking out with the 'git log' command (use shift-Q to exit the log).

Master vs. unstable branch

If you plan on changing libfreenect, writing wrappers, or trying the latest developments you might want to check out the unstable branch. Unstable has the latest commits that have not been fully tested yet. Otherwise just try the 'master' branch.

  • Take note that the master and unstable branches were synced on Jan. 6, 2011; see this update for more information.
  • On February the 15th, support for multiple resolutions was added to the unstable branch and the 1280x1024 RGB and IR mode was enabled as explained here.

After you have the source files, you should download the dependencies required to configure and build the library and then install the hardware driver...

Dependencies

For each required dependency, first download and install the libraries (.dll) on your system and then identify the paths to the libraries (.lib or .a) and header (.h) files which you will need later on to configure the source project using cmake:

Dependency Install Library/includes to be used with cmake (see this printscreen)
libusb-win32 - download and extract the latest libusb-win32-bin-x.x.x.x.zip NOTE: libusb-win32 1.2.5.0 changed the name of the include file. Please use libusb-win32 version 1.2.5.0 or higher. This will be taken care of when we install the driver in the next section The /lib and /include folders contain the libraries and header files required to configure the project; depending on the compiler you choose, you may have to specify a different library file:
  • For instance, to configure for MS Visual Studio 2010, use /lib/msvc/libusb.lib or if you plan to use mingw, use /lib/gcc/libusb.a as the libusb library path in cmake (LIBUSB_1_LIBRARY)
  • Select the path to the libusb header folder /include as libusb include path in cmake (LIBUSB_1_INCLUDE_DIR)

For more info see the libusb-win32 readme and their wiki

pthreads-win32 - download and extract the latest pthreads-w32-x-x-x-release.exe Find the /lib folder and copy the appropriate .dll library to /windows or /windows/system32 (see Library/includes to the right to figure out which one to use) The /lib and /include contain the libraries and header files required to configure the project; depending on the compiler you choose, you may have to specify a different library file:
  • For instance, to configure for MS Visual Studio 2010, use /lib/pthreadVC2.lib or if you plan to use mingw, use /lib/pthreadGC2.a as the pthread library path in cmake (THREADS_PTHREADS_WIN32_LIBRARY)
  • In both cases you will need to install the corresponding library .dll file to /windows/system32 i.e. phtreadVC2.dll or pthreadGC2.dll
  • Select the path to the pthread header folder /include as pthread include path in cmake (THREADS_PTHREADS_INCLUDE_DIR)

For more info see the pthreads-win32 readme and their FAQ

Glut - download and extract the latest glut-x.x.x-bin.zip Find the glut32.dll file and copy it to /windows/system or any directory included in your PATH system variable (see this explanation)
  • With MSVC, you should copy the glut.h header file to the /include/GL folder and the glut32.lib library to the /lib folder of your VC tree(for instance /Program Files/Microsoft Visual Studio 10.0/VC/) - if the GL folder is not there, create it and put the glut.h file there. If you built glut from source, the files should already be there.
  • In cmake-gui, supply the path to the header up to the /include folder (NOT ../include/GL) and the path to the library itself (../lib/glut32.lib) in cmake (GLUT_INCLUDE_DIR and GLUT_LIBRARY respectively)

For more info see the glut readme

Driver installation

There are two parts to libfreenect -- the low-level libusb-based device driver and libfreenect itself, the library that talks to the driver. You only need to install the driver once.

Windows 7: step-by-step walkthrough (should also work with Windows XP!)

  • Plug in your Kinect. Windows will warn that no device driver was found for the plugged device (the LED of Kinect will not turn on). If Windows presents a dialog asking to search for drivers, simply cancel it.
  • Open the Device Manager: Start >> Control Panel >> System and Security >> System >> Device Manager
  • A device called 'Xbox NUI Motor' should be somewhere there (most probably be under 'Other devices') with a small yellow warning symbol '!' on top of its icon. Right click on it, and select 'Update Driver Software...', then click on 'Browse my computer for driver software'.
  • 'Browse' and select the folder where the 'XBox_NUI_Motor.inf' is located (/platform/windows/inf inside your libfreenect source folder). Click 'Next' and if warned by Windows that a non-certified driver is about to be installed, just order it to install it anyway.
  • After that, the Kinect LED should start blinking green. Now there will be two additional devices in the Device Manager list: 'Xbox NUI Camera' and 'Xbox NUI Audio'. Repeat the above instructions for them as well.

You are now ready to configure libfreenect before building...

Configuring with cmake-gui

Follow these steps to configure libfreenect for compiling:

  1. Download Cmake (Cross-Platform Make) and make sure you have a working C compiler (Visual Studio 2010 or MinGW)
  2. Launch Cmake-GUI and select your /libfreenect folder as source, select an output folder, check the 'advanced' and 'grouped' checkboxes to display more variables and categorize them and then click on the 'Configure' button
  3. Select the C compiler you want to use
  4. Select the BUILD options you want, taking into consideration the following:
    1. For now only select the EXAMPLES and C_SYNC options in BUILD. The other build options such as FAKENECT have not been updated for Visual Studio yet
    2. But take a look at the following notes if you're interested in compiling the PYTHON wrapper
  5. Unresolved dependencies will show up as red in the CMake GUI. Supply the missing paths to the dependencies by following these guidelines, and click the 'Configure' button again:
    1. The *_LIBRARY variables need to point to actual .lib files not a folder
    2. INCLUDE variables need to point to the appropriate include directories
  6. When all errors have been resolved, click on the 'Generate' button to create the makefiles for your compiler.

Compiling

Now that the project is configured, open libfreenect.sln from your output folder and build it with Visual Studio. Then look for your compiled files in /bin and /lib

Osx Curl Tutorial

  • The freenect libraries in /lib are compiled but not installed at this point. To use them you should:
    • Add the path to the /lib folder to your system PATH environment variable or
    • Copy the libraries to a folder already in the system PATH like /windows/system32 or
    • Copy libraries to the folder of the program you want to run
  • If some items fail to compile the first time, simply right-click on the solution again and select 'Build' or 'Rebuild' to see if the missing items compile
  • If you're having issues compiling check out the readme in the /libfreenect/platform/windows folder for more information.

Testing

To do a quick test run /bin/glview.exe

  • It's also a good idea to check the wrappers section and the mailing list for more ideas and solutions...

User contributions

Retrieved from 'https://openkinect.org/w/index.php?title=Getting_Started&oldid=1909'