I have handle this case some time ago. But I didn’t write it down. So I spend several hour to resolve this problem. It is import to make some notes.(Cann’t type chinese in Ubuntu…..)
When compile node Openni2_camera, It encounter a error:
[ 20%] Built target nav_msgs_generate_messages_cpp
/usr/bin/ld: cannot find -lDummyDevice
/usr/bin/ld: cannot find -lPS1080
collect2: error: ld returned 1 exit status
make[2]: *** [/home/derwee/catkin_ws/devel/lib/libopenni2_wrapper.so] Error 1
make[1]: *** [openni2_camera/CMakeFiles/openni2_wrapper.dir/all] Error 2
Resolv: Make sure driver which provide by openni2
derwee@derwee-ThinkPad-T440:/usr/lib/OpenNI2/Drivers$ ls
libDummyDevice.so libOniFile.so libPS1080.so libPSLink.so
libDummyDevice.so.0 libOniFile.so.0 libPS1080.so.0 libPSLink.so.0
after that I can compile successfully. Unfortunately It cann’t connect to device by origin Driver provide by Openni2.
[ INFO] [1465264993.213948735]: No matching device found.... waiting for devices. Reason: std::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /home/derwee/catkin_ws/src/openni2_camera/src/openni2_driver.cpp @ 631 : Invalid device number 1, there are 0 devices connected.
This Time I should update driver linking to which driver provide by vendor:
derwee@derwee-ThinkPad-T440:/usr/lib/OpenNI2/Drivers$ ls
libOniFile.so libORBBEC.so libPSLink.so Orbbec.ini
libOniFile.so.0 libORBBEC.so.0 libPSLink.so.0 PSLink.ini
now it works well.