code-iai / iai_kinect2

Tools for using the Kinect One (Kinect v2) in ROS
Apache License 2.0
881 stars 519 forks source link

Error during compiling #492

Closed Neykah closed 6 years ago

Neykah commented 6 years ago

Hi, When I try to compile, I encounter some errors that make catkin_make fail.

My Protonect works properly and I installed it using these flags:

cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/freenect2 -Dfreenect2_DIR=$HOME/freenect2/lib/cmake/freenect2 -DENABLE_CXX11=ON -DCUDA_PROPAGATE_HOST_FLAGS=off

Then, when I call rosdep, I have some errors but according to the readme, I shouldn't worry about them right ?

~/catkin_ws/src/iai_kinect2$ rosdep install -r --from-paths . ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: kinect2_viewer: Cannot locate rosdep definition for [kinect2_bridge] iai_kinect2: Cannot locate rosdep definition for [kinect2_registration] kinect2_calibration: Cannot locate rosdep definition for [kinect2_bridge] kinect2_bridge: Cannot locate rosdep definition for [kinect2_registration] Continuing to install resolvable dependencies...

All required rosdeps installed successfully

And finally, during catkin_make:

[...] /home/morgan/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp: In member function ‘bool Kinect2Bridge::initPipeline(const string&, int32_t)’: /home/morgan/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:427:28: error: expected type-specifier packetPipeline = new libfreenect2::OpenCLKdePacketPipeline(device); ^ /home/morgan/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:436:28: error: expected type-specifier packetPipeline = new libfreenect2::CudaKdePacketPipeline(device); ^ /home/morgan/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp: In member function ‘bool Kinect2Bridge::initPipeline(const string&, int32_t)’: /home/morgan/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:427:28: error: expected type-specifier packetPipeline = new libfreenect2::OpenCLKdePacketPipeline(device); ^ /home/morgan/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:436:28: error: expected type-specifier packetPipeline = new libfreenect2::CudaKdePacketPipeline(device); ^ [ 58%] Linking CXX executable /home/morgan/catkin_ws/devel/lib/perception/publish_pcl_cloud [ 62%] Linking CXX shared library /home/morgan/catkin_ws/devel/lib/libperception_downsample.so iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge.dir/build.make:62: recipe for target 'iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge.dir/src/kinect2_bridge.cpp.o' failed make[2]: [iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge.dir/src/kinect2_bridge.cpp.o] Error 1 CMakeFiles/Makefile2:1770: recipe for target 'iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge.dir/all' failed make[1]: [iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge_nodelet.dir/build.make:62: recipe for target 'iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge_nodelet.dir/src/kinect2_bridge.cpp.o' failed make[2]: [iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge_nodelet.dir/src/kinect2_bridge.cpp.o] Error 1 CMakeFiles/Makefile2:2415: recipe for target 'iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge_nodelet.dir/all' failed make[1]: *** [iai_kinect2/kinect2_bridge/CMakeFiles/kinect2_bridge_nodelet.dir/all] Error 2

Thank you in advance for your help.

Neykah commented 6 years ago

Solved: Same issue as #369, switching to master branch for libfreenect solve the issue.