ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Error compiling openni2_camera -> libopenni2_wrapper.so

asked 2014-05-09 13:01:14 -0600

honky gravatar image

updated 2022-03-20 10:17:31 -0600

lucasw gravatar image

I'am trying to get openNi2_camera with ros hydro running on a raspberry pi. The other files just went fine, now the executeable is failing with the following error:

Scanning dependencies of target openni2_camera_node
[ 92%] Building CXX object openni2_camera/CMakeFiles/openni2_camera_node.dir/ros/openni2_camera_node.cpp.o
/tmp/ccU7U6HY.s: Assembler messages:
/tmp/ccU7U6HY.s:82: Warning: swp{b} use is deprecated for this architecture
Linking CXX executable /home/pi/catkin_ws/devel/lib/openni2_camera/openni2_camera_node
/home/pi/catkin_ws/devel/lib/libopenni2_wrapper.so: undefined reference to `oniStreamRegisterNewFrameCallback'
/home/pi/catkin_ws/devel/lib/libopenni2_wrapper.so: undefined reference to `oniStreamGetProperty'
/home/pi/catkin_ws/devel/lib/libopenni2_wrapper.so: undefined reference to `oniDeviceIsCommandSupported'
/home/pi/catkin_ws/devel/lib/libopenni2_wrapper.so: undefined reference to `oniDeviceSetProperty'

I couldn't use apt-get install libopenni2-dev, which is why I compiled everything from the source, having working Sample-Apps of OpenNi2 like SimpleRead.

I also added something to the CMakeLists.txt like that:

set(PC_OPENNI2_LIBRARIES /home/pi/OpenNI2/)
include_directories(${PC_OPENNI2_LIBRARIES}/Include)
include_directories(${PC_OPENNI2_LIBRARIES}/Source)

Thanks for any advice in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-05-09 22:45:28 -0600

honky gravatar image

After adding this to my CMakeLists.txt it worked:

include_directories(/home/pi/kalectro/OpenNI2/Include)
include_directories(/home/pi/kalektro/OpenNI2/Source)

##Find pack for OpenNI2
find_path(OpenNI2_INCLUDEDIR
      NAMES OpenNI.h
      HINTS /home/pi/kalectro/OpenNI2/Include)
find_library(OpenNI2_LIBRARIES
     NAMES OpenNI2 DummyDevice OniFile PS1090
     HINTS /usr/lib/ /usr/lib/OpenNI2/Drivers
     PATH_SUFFIXES lib)
message (STATUS ${OpenNI2_LIBRARIES})
include_directories(${OpenNI2_INCLUDEDIR})
link_directories(${OPENNI2_DIR}/Redist)
include_directories(${OPENNI2_DIR}/Include)
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-05-09 13:01:14 -0600

Seen: 729 times

Last updated: May 09 '14