Make error OpenNI.h

Cloned the astra sdk from GitHub - orbbec/astra: Orbbec Astra SDK - build amazing 3D apps with Orbbec 3D cameras today.

Created a build directory: astra/build and then ran cmake …

Now running sudo make from astra/build directory produces this error

[ 45%] Built target astra-device-sdk Scanning dependencies of target openni_sensor [ 45%] Building CXX object src/plugins/openni_sensor/CMakeFiles/openni_sensor.dir/oni_adapter_plugin.cpp.o In file included from /home/diane/programs/astra/src/plugins/openni_sensor/oni_adapter_plugin.hpp:7:0, from /home/diane/programs/astra/src/plugins/openni_sensor/oni_adapter_plugin.cpp:6: /home/diane/programs/astra/src/plugins/openni_sensor/oni_devicestream.hpp:5:20: fatal error: OpenNI.h: No such file or directory #include <OpenNI.h> ^ compilation terminated. make[2]: *** [src/plugins/openni_sensor/CMakeFiles/openni_sensor.dir/oni_adapter_plugin.cpp.o] Error 1 make[1]: *** [src/plugins/openni_sensor/CMakeFiles/openni_sensor.dir/all] Error 2 make: *** [all] Error 2
I have installed OpenNI2 libraries from here: https://github.com/occipital/openni2

and confirmed that OpenNI.h is in the /usr/include/openni2 path:

diane@diane-HP-Pavilion-dv6-Notebook-PC:/usr/include/openni2/Include$ ls
Android-Arm MacOSX OniCTypes.h OniVersion.h PSLink.h
Driver OniCAPI.h OniEnums.h OpenNI.h Win32
Linux-Arm OniCEnums.h OniPlatform.h PrimeSense.h
Linux-x86 OniCProperties.h OniProperties.h PS1080.h

How do I fix this make error?

You have to export OPENNI2_INCLUDE.
export OPENNI2_INCLUDE=<your openni2 include path>

so in your case:
export OPENNI2_INCLUDE=/usr/include/openni2/Include
make

You will also need to export OPENNI2_REDIST, before you ask about it :smile:

export OPENNI2_REDIST=/usr/lib/openni2/lib or where ever you have installed or compiled the libs.