3rd_freenect

freenect 3rd party

freenect is an open source Kinect driver developed by the OpenKinect community. freenect is licensed under the terms of the Apache License, version 2.0, or, at your option, the terms of the GNU General Public License, version 2.0. freenect is one of the optional 3rd parties supported by ViSP sensor module.

Installation informations are provided on OpenKinect wiki. Note that freenect needs additional dependencies: libusb-1.0 and libpthread.

With ViSP freenect installation enables vpKinect class usage.

Hereafter we provide installation instructions for the following OS:

 logo-ubuntu-alpha  logo-debian logo-fedora  logo-redhat  logo-apple-alpha  logo-win-alpha
Ubuntu Debian Fedora RedHat OSX Windows

Ubuntu or debian installation

On Linux Debian or since Ubuntu Precise 12.04, you may install the package with:

sudo apt-get install libfreenect-dev

Then set the video device rights with:

sudo adduser your-login video

Once installation is performed, freenect-glview binary allows to test the Kinect under Linux.

Fedora or RedHat installation

On Linux Fedora or RedHat, you should do a manual build of freenect. Complete installation process is provided on OpenKinect wiki. To be able to access the Kinect usb device, depending on your computer configuration, you could also need to set the permissions on /dev/bus/usb by:

su -c "chmod -R a+rw /dev/bus"

Mac OSX installation

On OSX you may install the package with homebrew:

brew install libfreenect

Windows installation

Under Microsoft Windows platforms, you should do a manual build of freenect. Complete installation process is provided on OpenKinect wiki.

Known issues

  1. freenect is compatible with Kinect Model 1414, but seems not compatible with Model 1473.
  2. On Linux, if you get the error “Could not open motor: -3” it could mean that you don’t have the rights to access to usb devices. Try to run as root in a terminal:
    chmod -R a+rw /dev/bus
  3. On Linux Ubuntu, if you get the error “Could not claim interface on camera: -6”, try to run in a terminal:
    modprobe -r gspca_kinect
  4. On Linux, if you get the error “Could not open camera: -3” it could mean that you have a Kinect Model 1473 that is not compatible with libfreenect.
  5. When USE_CPP11 CMake option is ON, if you get the build error
    /usr/include/libfreenect.hpp:130:4: error: no matching function for call to make_pair(int&, vpKinect*)

    edit /usr/include/libfreenect.hpp and change createDevice() as:

    T& createDevice(int _index) {
      //m_devices.insert(std::make_pair<int, T*>(_index, new T(m_ctx, _index)));
      m_devices.insert(std::pair<int, T*>(_index, new T(m_ctx, _index)));
      return *(m_devices[_index]);
    }
  6. Again, when USE_CPP11 CMake option is ON under Debian Wheezy 7.0, if you get this other build error
    /usr/include/libfreenect.hpp:197:4: error: no matching function for call to make_pair(int&, vpKinect*&)

    edit /usr/include/libfreenect.hpp and change createDevice() as:

    ConcreteDevice& createDevice(int _index) {
      DeviceMap::iterator it = m_devices.find(_index);
      if (it != m_devices.end()) delete it->second;
      ConcreteDevice * device = new ConcreteDevice(m_ctx, _index);
      //m_devices.insert(std::make_pair<int, freenectdevice*="">(_index, device));
      m_devices.insert(std::pair<int, freenectdevice*="">(_index, device));
      return *device;
    }
  7. Again, when USE_CPP11 CMake option is ON under Ubuntu 16.04, if you get this other build error
    /usr/include/libfreenect.hpp:202:72: error: no matching function for call to ‘make_pair(int&, vpKinect*&)’

    edit /usr/include/libfreenect.hpp and change createDevice() as:

    ConcreteDevice& createDevice(int _index) {
      DeviceMap::iterator it = m_devices.find(_index);
      if (it != m_devices.end()) delete it->second;
      ConcreteDevice * device = new ConcreteDevice(m_ctx, _index);
      //m_devices.insert(std::make_pair<int, FreenectDevice*>(_index, device));
      m_devices.insert(std::pair<int, FreenectDevice*>(_index, device));
      return *device;
    }

Comments are closed.