<> <> == Overview == OpenNI is an open-source framework for "natural interaction" - using your hands and body to interact with your digital devices. See [[http://openni.org|OpenNI.org]] for more information about OpenNI. Most ROS users will not need to use OpenNI directly. [[openni_camera]] already implements a fully-featured ROS camera driver on top of OpenNI. See [[openni_kinect]] to get started with your Kinect in ROS. In Electric and Diamondback, to use OpenNI directly in your packages you would depend on the `openni` wrapper package. As of Fuerte the `openni` package is deprecated, and you should link against the system installation of OpenNI as described in the [[#Fuerte_migration_guide|migration guide]]. == Repositories == Willow Garage maintains the system installs of OpenNI (the framework) and ps-engine (the device driver from !PrimeSense) required by ROS. These track the [[https://github.com/OpenNI/OpenNI|OpenNI]] and [[https://github.com/PrimeSense/Sensor|PrimeSense/Sensor]] projects on !GitHub. We apply some patches to the !GitHub sources (e.g. for recognizing Kinects, as well as the ASUS Xtion and !PrimeSense's prototype devices). These patches and build scripts are located in our [[https://kforge.ros.org/openni/drivers|openni/drivers]] project. == Fuerte migration guide == === manifest.xml (depending on OpenNI) === Instead of depending on the `openni` package, declare the following [[rosdep|rosdeps]] in your [[Manifest|manifest.xml]]: {{{ }}} Now `rosdep install MY_AWESOME_PACKAGE` will install OpenNI and the `ps-engine` device driver. If you provide headers included by code in other packages, and those headers use OpenNI, then you must also export the flags to find OpenNI: {{{ }}} === CMakeLists.txt (linking against OpenNI) === The OpenNI headers are installed in `/usr/include/openni`. The libraries are in the standard search path `/usr/lib`. In your [[rosbuild/CMakeLists|CMakeLists.txt]], add the include directory: {{{ include_directories(/usr/include/openni) }}} And link your binaries: {{{ rosbuild_add_executable(my_awesome_demo src/my_awesome_demo.cpp) target_link_libraries(my_awesome_demo OpenNI) }}} === my_code.cpp (using OpenNI in your code) === You can access the OpenNI C++ wrapper in your code with: {{{ #!cplusplus #include }}} See the [[http://openni.org/Documentation/|OpenNI documentation]] for more information. ## AUTOGENERATED DON'T DELETE ## CategoryPackage