paul-shuvo / iai_kinect2_opencv4

Tools for using the Kinect One (Kinect v2) in ROS with OpenCV4. Tested on ROS Noetic
Apache License 2.0
30 stars 18 forks source link

Failed to load nodelet '/kinect2_bridge` of type `kinect2_bridge/kinect2_bridge_nodelet` to manager `kinect2' #7

Open prasuchit opened 1 year ago

prasuchit commented 1 year ago

Hi,

I have been using this package on a workstation with Ubuntu 20.04 and ROS Noetic for quite a while now and when I tried to use it on a different workstation with the exact same configurations I get the following error:

[FATAL] [1680215218.827799711]: Failed to load nodelet '/kinect2_bridgeof typekinect2_bridge/kinect2_bridge_nodeletto managerkinect2' [kinect2-1] process has died [pid 69284, exit code -11, cmd /opt/ros/noetic/lib/nodelet/nodelet manager name:=kinect2 log:=/home/prasanth/.ros/log/95e221f4-cf49-11ed-8f45-4f0296c6dcfb/kinect2-1.log]. log file: /home/prasanth/.ros/log/95e221f4-cf49-11ed-8f45-4f0296c6dcfb/kinect2-1.log [kinect2_bridge-2] process has died [pid 69285, exit code 255, cmd /opt/ros/noetic/lib/nodelet/nodelet load kinect2_bridge/kinect2_bridge_nodelet kinect2 __name:=kinect2_bridge __log:=/home/prasanth/.ros/log/95e221f4-cf49-11ed-8f45-4f0296c6dcfb/kinect2_bridge-2.log]. log file: /home/prasanth/.ros/log/95e221f4-cf49-11ed-8f45-4f0296c6dcfb/kinect2_bridge-2.log

I used GDB to debug and this is what I see:

Thread 1 "kinect2_bridge" received signal SIGSEGV, Segmentation fault. 0x00007ffff7ea093b in cv::initUndistortRectifyMap(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::InputArray const&, cv::Size, int, cv::_OutputArray const&, cv::_OutputArray const&) () from /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so.4.2 (gdb) bt

0 0x00007ffff7ea093b in cv::initUndistortRectifyMap(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::InputArray const&, cv::Size, int, cv::_OutputArray const&, cv::_OutputArray const&) ()

from /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so.4.2

1 0x00007ffff708d06e in DepthRegistration::init (this=0x555555ada160,

cameraMatrixRegistered=..., sizeRegistered=..., cameraMatrixDepth=..., 
sizeDepth=..., distortionDepth=..., rotation=..., translation=..., 
zNear=0.5, zFar=12, deviceId=-1)
at /home/prasanth/catkin_ws/src/iai_kinect2_opencv4/kinect2_registration/src/kinect2_registration.cpp:50

2 0x00005555555ae990 in Kinect2Bridge::initRegistration (

this=0x7fffffffca30, method="opencl", device=-1, maxDepth=12)
at /home/prasanth/catkin_ws/src/iai_kinect2_opencv4/kinect2_bridge/src/kinect2_bridge.cpp:366

3 0x00005555555adbcd in Kinect2Bridge::initialize (this=0x7fffffffca30)

at /home/prasanth/catkin_ws/src/iai_kinect2_opencv4/kinect2_bridge/src/kinect2_bridge.cpp:314

4 0x00005555555ab4d3 in Kinect2Bridge::start (this=0x7fffffffca30)

at /home/prasanth/catkin_ws/src/iai_kinect2_opencv4/kinect2_bridge/src/kinect2_bridge.cpp:152

I have no idea what I'm missing since everything seems to be identical to the other machine. I am able to use ./Protonect with no issues.

@paul-shuvo Kindly help.

paul-shuvo commented 1 year ago

Hi @prasuchit,

Let me know if this helps. In the meantime, I'd suggest posting this issue here as well.