[ros-users] Segfault in OpenNI
Taylor Veltrop
taylor at veltrop.com
Fri Dec 10 10:20:28 UTC 2010
Hello everyone, I recently got the OpenNI skeleton tracking sample
working with my Kinect, and would like to bring that functionality
into my own ROS node.
I'm getting a segfault in my test code so to debug the setup I am now
trying to build the known working Sample-NiUserTracker under my own
ROS package. I copied its source files over, put this in the
manifest.xml which has no other dependencies listed:
<depend package="openni"/>
<depend package="ps_engine"/>
<depend package="nite"/>
<depend package="openni_camera"/>
And put this in the CMakeLists.txt:
rosbuild_add_executable(NiUserTracker src/NiUserTracker/main.cpp
src/NiUserTracker/SceneDrawer.cpp)
target_link_libraries(NiUserTracker glut)
When executing it it segfaults from xn::UserGenerator::Create():
ived signal SIGSEGV, Segmentation fault.
0x00bf7f82 in __ModuleRegisterToNewDataAvailable () from
/home/space/ni/ni/ps_engine/lib/libXnDeviceSensorV2.so
(gdb) backtrace
#0 0x00bf7f82 in __ModuleRegisterToNewDataAvailable () from
/home/space/ni/ni/ps_engine/lib/libXnDeviceSensorV2.so
#1 0x00ca41e0 in xnRegisterToModuleStateChange(unsigned int
(*)(void*, void (*)(void*), void*, void**), void*,
XnInternalNodeData*, void (*)(XnInternalNodeData*, void*), void*,
void**) () from /home/space/ni/ni/openni/lib/libOpenNI.so
#2 0x00ca4a56 in xnRegisterToNewDataAvailable () from
/home/space/ni/ni/openni/lib/libOpenNI.so
#3 0x00cab73e in xnCreateProductionTreeImpl(XnContext*, XnNodeInfo*)
() from /home/space/ni/ni/openni/lib/libOpenNI.so
#4 0x00cabc10 in xnCreateProductionTree () from
/home/space/ni/ni/openni/lib/libOpenNI.so
#5 0x00cac348 in xnCreateAnyProductionTree () from
/home/space/ni/ni/openni/lib/libOpenNI.so
#6 0x00cac41a in xnCreateUserGenerator () from
/home/space/ni/ni/openni/lib/libOpenNI.so
#7 0x0804d998 in xn::UserGenerator::Create (this=0x8052298,
context=..., pQuery=0x0, pErrors=0x0) at
/home/space/ni/ni/openni/include/ni/XnCppWrapper.h:4631
#8 0x0804cff7 in main (argc=1, argv=0xbfffece4) at
/REMOVEDFORPRIVACY/src/NiUserTracker/main.cpp:253
(gdb)
Any idea what is going on? I'd like to figure out the segfault but if
there is another way to obtain skeleton data that would avoid this
approach entirely I'm open to suggestions too ;)
Thanks,
Taylor Veltrop
More information about the ros-users
mailing list