Ubuntu16.04/ubuntu18.04 running kinectV2: problems encountered in installing libfreenect2 and iai_kinect2

reference

Ubuntu18.04+ROS install Kinect V2 steps and problem solving -> first install according to this tutorial.

Problems compiling and running libfreenect2

Ubuntu16.04 and Ubuntu18.04 are basically the same.

Running problem: found 0 devices

Kinect2 must be plugged into USB3.0. If you still cannot find the device after plugging in USB3.0, then try to change more USB ports. I successfully connected Kinect2 by plugging in the USB3.0 interface on the back of the desktop.

Operation problem: subpacket too large

The installed libusb version is too low, the installed libusb version must be greater than or equal to 1.0.20, download link , installation tutorial: ubuntu 16.04 source code installation libusb .

Operation problem: skipping depth packet

solution_skipping_depth_packet
You need to download the correct version of glfw and CUDA. In the newly installed Ubuntu16.04 system, the Nouveau graphics driver that comes with the UBuntu system is used. You need to install the Nvidia graphics driver. You can install the driver in the software and update application, or go Download it from the official website and install it yourself ( note that Nouveau must be disabled, otherwise you will not be able to enter the desktop system after restarting ). -> Reference: Ubuntu install and uninstall CUDA and CUDNN
gpu_driver
Insert picture description here

Problems with compiling and running iai_kinect

Ubuntu16.04

Follow the steps of installing Kinect V2 on the blog Ubuntu18.04+ROS and the steps to solve the problem , you can run Kinect2 successfully. Github mentioned that the opencv2 version of iai_kinect is required, but I have not installed any opencv version. Only the opencv-3.3.1 version that comes with ros-kinetic did not cause any problems.

UBuntu18.04

The opencv that comes with ros-melodic is 3.2.0, the error occurs when compiling and running:
ImportError: No module named rospkg -> the reason why anaconda is installed

Opencv version causes compilation failure -> Opencv-2.4.13 version is installed, and OpenCV_DIR is set to the path of 2.4.13 version in the CMakeList file. It can be successfully compiled and passed, but there is a warning of conflict between opencv-3.2.0 and opencv-2.4 . I still encountered an error during the formal operation. There were discussions on related issues on the Internet, but the problems caused by version conflicts were never resolved. It may be that the 18.04 version took a long time to install anaconda and many different opencv versions? Or is the ros-melodic version that comes with opencv-3.2.0 not suitable for iai_kinect compilation? But look at the online tutorial, should be able to compile and run under the correct iai_kinect at 18.04, but I now have no good solution, metaphysics ... .

Run roslaunch kinect2_bridge kinect2_bridge.launch error:
Insert picture description here
Run rosrun kinect2_viewer kinect2_viewer error:
Insert picture description here

Guess you like

Origin blog.csdn.net/XindaBlack/article/details/106077817