There are several ways to install the kinect V1 driver under Linux. Here is my installation process.
kinect V1 driver installation
Reference: https://www.20papercups.net/programming/kinect-on-ubuntu-with-openni/
https://www.cnblogs.com/sincere-diligence/p/9322313.html
1. Install the necessary dependencies
sudo apt-get install git build-essential python libusb-1.0-0-dev freeglut3-dev openjdk-7-jdk
sudo apt-get install doxygen graphviz mono-complete
2. Install OpenNI 1.5.4
git clone https://github.com/OpenNI/OpenNI.git
cd OpenNI
git checkout Unstable-1.5.4.0
cd Platform/Linux/CreateRedist
chmod +x RedistMaker
./RedistMaker
cd ../Redist/OpenNI-Bin-Dev-Linux-[xxx] (where [xxx] is your architecture and this particular OpenNI release)
sudo ./install.sh
3. Install Kinect Sensor Module
git clone https://github.com/avin2/SensorKinect
cd SensorKinect
cd Platform/Linux/CreateRedist
chmod +x RedistMaker
./RedistMaker
cd ../Redist/Sensor-Bin-Linux-[xxx] (where [xxx] is your architecture and this particular OpenNI release)
chmod +x install.sh
sudo ./install.sh
4. Test OpenNI Samples
cd OpenNI/Platform/Linux/Bin/Release
./Sample-NiSimpleViewer
5. Install the kinect driver under ros
sudo apt install ros-kinetic-openni-camera
sudo apt install ros-kinetic-openni-launch
rosstack profile
rospack profile
sudo apt install ros-kinetic-freenect-camera ros-kinetic-freenect-stack ros-kinetic-freenect-launch
Start the camera: roslaunch openni_launch openni.launch
then open rviz, you can see the screen in rviz, indicating that the installation is successful.
Then you can happily develop.