I am pretty much new to Ubuntu file and directory system. I installed OpenNi2 using sudo apt install libopenni2-dev but now could not find the NiViewer executable to test the installation. I looked in /usr/bin and usr/local/bin but its not there.However when I download OpenNI2 from here it contains a NiViewer which does not run. But when i execute the install.sh then the NiViewer runs. I looked into the install.sh file. It has this two parts I guess...installing the udev rules and exporting the environmental variables. This is how the install.sh file looks
if [ `whoami` != root ]; then
echo Please run this script with sudo
exit
fi
ORIG_PATH=`pwd`
cd `dirname $0`
SCRIPT_PATH=`pwd`
cd $ORIG_PATH
if [ "`uname -s`" != "Darwin" ]; then
# Install UDEV rules for USB device
cp ${SCRIPT_PATH}/primesense-usb.rules /etc/udev/rules.d/557-primesense-usb.rules
fi
OUT_FILE="$SCRIPT_PATH/OpenNIDevEnvironment"
echo "export OPENNI2_INCLUDE=$SCRIPT_PATH/Include" > $OUT_FILE
echo "export OPENNI2_REDIST=$SCRIPT_PATH/Redist" >> $OUT_FILE
chmod a+r $OUT_FILE
My questions are the following:
- can I make NiViewer run without running the install.sh file by just the things available after I have
sudo apt install libopenni2-dev? i.e. can the udev rules be set without running the install.sh file?(environmental variables already has the path/usr/libadded to it I guess) - If I install OpenNI2 using the install.sh file then the location of the libs gets altered. Its not the usual
/usr/lib. How will any cmake detect the location of OpenNI libs if I need OpenNI to build any other library like PCL or OpenCV?