RTABMAP not detecting Kinect

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

RTABMAP not detecting Kinect

multinet
Hello,

I am having a problem connecting my kinect with rtabmap. I am getting the following errors and cannot find my device in the detection menu of the rtabmap window.


Kindly help me with this problem

Regards
Reply | Threaded
Open this post in threaded view
|

Re: RTABMAP not detecting Kinect

matlabbe
Administrator
The kinect seems detected, but rgbd_odometry crashes. Just tried on indigo latest code from source and it should work. What are the dependencies? Can you show output of cmake for rtabmap build?
$ cd rtabmap/build
$ cmake ..

You may try to start rtabmap with gdb:
$ roslaunch rtabmap_ros rgbd_mapping.launch launch_prefix:="xterm -e gdb --args" ...
Then do "bt" (bascktrace) on rgbd_odometry terminal after it crashes to see more info.
Reply | Threaded
Open this post in threaded view
|

Re: RTABMAP not detecting Kinect

multinet
Hello,
Thank you for replying. Here is the output of cmake.

CMake Deprecation Warning at CMakeLists.txt:57 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- PCL definitions don't contain "-march=native", make sure all libraries using Eigen are also compiled without that flag to avoid some segmentation faults (with gdb referring to some Eigen functions).
-- Found OpenMP
-- Found OpenCV: /usr/local/include/opencv;/usr/local/include
-- Found PCL: /usr/include/pcl-1.7;/usr/local/include/eigen3;/usr/include;/usr/include/ni;/usr/include/openni2;/usr/include/vtk-5.8
-- Found ZLIB: /usr/include
-- Found Freenect: /usr/include
-- Found OpenNI2: /usr/include/openni2
-- Found DC1394: /usr/include/dc1394
-- Found RealSense: /opt/ros/indigo/include
-- Found octomap 1.6.9: /opt/ros/indigo/include
-- Found Pthreads
CMake Deprecation Warning at tools/KittiDataset/CMakeLists.txt:14 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at tools/RgbdDataset/CMakeLists.txt:14 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at tools/EurocDataset/CMakeLists.txt:30 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at tools/Recovery/CMakeLists.txt:12 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at tools/Reprocess/CMakeLists.txt:12 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at tools/Report/CMakeLists.txt:16 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at examples/BOWMapping/CMakeLists.txt:27 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at examples/RGBDMapping/CMakeLists.txt:41 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at examples/WifiMapping/CMakeLists.txt:35 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at examples/NoEventsExample/CMakeLists.txt:35 (cmake_policy):
  The OLD behavior for policy CMP0020 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- --------------------------------------------
-- Info :
--   Version : 0.17.4
--   CMAKE_INSTALL_PREFIX = /home/d4sys/catkin_ws/devel
--   CMAKE_BUILD_TYPE =     Release
--   CMAKE_INSTALL_LIBDIR = lib
--   BUILD_APP =            ON
--   BUILD_TOOLS =          ON
--   BUILD_EXAMPLES =       ON
--   BUILD_SHARED_LIBS =    ON
--   CMAKE_CXX_FLAGS =  -fmessage-length=0  -Wno-deprecated -fopenmp -std=c++11
--   PCL_DEFINITIONS = -DEIGEN_USE_NEW_STDVECTOR;-DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET;-DFLANN_STATIC;-Dqh_QHpointer
--   With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = YES (License: Non commercial)
--   With Freenect             = YES (License: Apache v2 and/or GPLv2)
--   With OpenNI2              = YES (License: Apache v2)
--   With Freenect2            = NO (libfreenect2 not found)
--   With Kinect for Windows 2 = NO (Kinect for Windows 2 SDK not found)
--   With dc1394               = YES (License: LGPL)
--   With FlyCapture2/Triclops = NO (Point Grey SDK not found)
--   With TORO                 = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
--   With g2o                  = NO (WITH_G2O=OFF)
--   With GTSAM                = NO (GTSAM not found)
--   With VERTIGO              = NO (GTSAM or g2o required)
--   With cvsba                = NO (cvsba not found)
--   With libpointmatcher      = NO (libpointmatcher not found)
--   With loam_velodyne        = NO (loam_velodyne not found)
--   With ZED                  = NO (ZED sdk not found)
--   With RealSense            = YES (License: Apache-2)
--   With RealSenseSlam        = NO (WITH_REALSENSE_SLAM=OFF)
--   With RealSense2           = NO (librealsense2 not found)
--   With OCTOMAP              = YES (License: BSD)
--   With CPUTSDF              = NO (CPUTSDF not found)
--   With OpenChisel           = NO (open_chisel not found)
--   With libfovis             = NO (libfovis not found)
--   With libviso2             = NO (libviso2 not found)
--   With dvo_core             = NO (dvo_core not found)
--   With okvis                = NO (okvis not found)
--   With msckf_vio            = NO (WITH_MSCKF_VIO=OFF)
--   With ORB_SLAM2            = NO (ORB_SLAM2 not found, make sure environment variable ORB_SLAM2_ROOT_DIR is set)
--   With Qt4                  = YES (License: Open Source or Commercial)
-- --------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /home/d4sys/rtabmap/build


And when I run the command
matlabbe wrote
$ roslaunch rtabmap_ros rgbd_mapping.launch launch_prefix:="xterm -e gdb --args" ...
it just shows this

Reply | Threaded
Open this post in threaded view
|

Re: RTABMAP not detecting Kinect

multinet
Hello,
After a bit of searching i found a link which I think is also answered by you. I tried running the command but it gave the following error.



This error is what I got before as well right before the rgbd_odometry crash statement. When I change the frame_id form camera_link to base_link it doesn't give the error but continuously spits out warnings.
[ WARN] [1534153055.001212118]: odometry: Could not get transform from base_link to camera_rgb_optical_frame (stamp=1534153054.866910) after 0.100000 seconds ("wait_for_transform_duration"=0.100000)! Error="canTransform: target_frame base_link does not exist.. canTransform returned after 0.100552 timeout was 0.1."

I was trying to run the kinect with visual_odometry as shown in section 2.5 of Setup On Your Robot


Regards
Reply | Threaded
Open this post in threaded view
|

Re: RTABMAP not detecting Kinect

matlabbe
Administrator
Hi,

It seems you have installed OpenCV3 on a computer with ROS Indigo:
--   With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = YES (License: Non commercial)
rtabmap_ros is linked on cv_bridge, which is built against OpenCV2. While being also linked to rtabmap which is built against OpenCV3, there are two opencv versions loaded at the same time when launching rtabmap_ros nodes. This is likely causing crashes when opencv functions are used. If you want to use OpenCV3, you should remove ros-indigo-cv-bridge and build cv_bridge from source. This will uninstall many depending packages, so you should rebuild them all from source (so they link on cv_bridge version built with OpenCV3).

Well, if you want to use OpenCV3, I recommend upgrading to ROS Kinetic on ubuntu 16.04, for which cv_bridge is built with OpenCV3 by default. Otherwise, it may be just easier to use only OpenCV2 on Indigo so you don't have to rebuild everything.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: RTABMAP not detecting Kinect

multinet
Hi, I installed opencv 2.4.13 and tried building it again but it gave an error during catkin_make -j1

Invoking "make -j1" failed

tried it with -j4 and then with just catkin_make but the error still remains.

[ 77%] Linking CXX executable /home/d4sys/catkin_ws/devel/lib/rtabmap_ros/odom_msg_to_tf
/usr/local/lib/libopencv_nonfree.so.2.4.13: undefined reference to `cv::ocl::integral(cv::ocl::ocvMat const&, cv::ocl::oclMat&)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/d4sys/catkin_ws/devel/lib/rtabmap_ros/odom_msg_to_tf] Error 1
make[1]: *** [rtabmap_ros/CMakeFiles/odom_msg_to_tf.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j1" failed

Regards
Reply | Threaded
Open this post in threaded view
|

Re: RTABMAP not detecting Kinect

matlabbe
Administrator
This post was updated on .