Rosanswers logo

I'm trying to run RGBDSLAM v2 with Kinect v2.

After sucessfully building, roslaunch rgbdslam openni+rgbdslam.launch resulted in the program running correctly, but there are no images coming from the Kinect v2. On the error output, it says:

process[rgbdslam-26]: started with pid [7843]
Initializing Node...
[ INFO] [1463623928.121529730]: Connected to roscore
[ INFO] [1463623928.405880762]: Using ORB keypoint detector.
[ INFO] [1463623928.405991250]: Using gridded keypoint detector with 3x3 cells, keeping 900 keypoints in total.
[ INFO] [1463623928.406055834]: Using adjusted keypoint detector with 5 maximum iterations, keeping the number of keypoints between 67 and 100
[ INFO] [1463623928.444573891]: Listening to /camera/rgb/image_color and /camera/depth_registered/sw_registered/image_rect_raw
[ INFO] [1463623931.311227274]: No devices connected.... waiting for devices to be connected

The last line repeated as the program stays running.

Seems like although test programs that come with Kinect drivers have recognized the Kinect v2 correctly, the program RGBDSLAM hasn't yet.

Protonect or NiViewer2 run OK and output RGB images and depth images, although it's left-right mirrored, and NiViewer2's output screen's lower half is black. However NiViewer doesn't recognize Kinect and outputs:

~$ NiViewer
One or more of the following nodes could not be enumerated:

Device: PrimeSense/SensorKinect/ The device is not connected!
Device: PrimeSense/SensorV2/ The device is not connected!
Device: PrimeSense/SensorV2/ The device is not connected!
Device: PrimeSense/SensorKinect/ The device is not connected!
Device: PrimeSense/SensorV2/ The device is not connected!
Device: PrimeSense/SensorV2/ The device is not connected!
Device: PrimeSense/SensorKinect/ The device is not connected!
Device: PrimeSense/SensorV2/ The device is not connected!
Device: PrimeSense/SensorV2/ The device is not connected!

Press any key to continue . . .

lsusb outputs 3 Microsoft Corp. at the 3 USB ports corresponding to the USB slot Kinect v2 is plugged in.

I have tested with the patch avin2 (https://github.com/avin2/SensorKinect) but that didn't make RGBDSLAM v2 recognize the Kinect v2 (maybe that caused multiple identical lines in the NiViewer output above).

I want to ask how I can solve or can get to know mor about this error? Why is NiViewer2 and Protonect uses the Kinect v2 correctly but RGBDSLAM doesn't?

Originally posted by Mr. Kro on ROS Answers with karma: 15 on 2016-05-18

Post score: 0


2 Answers 2


Rosanswers logo

Your problem is not really related to RGBDSLAM. You can not use roslaunch rgbdslam openni+rgbdslam.launch because this is for Kinect V1.

Your first step muss be: Your Kinect V2 muss run with ROS. You can find enough information in this FAQ and there: https://github.com/code-iai/iai_kinect2

Then you can create a modified launch file, see my post: http://answers.ros.org/question/230412/slam-with-kinect2/

Originally posted by MichaelKorn with karma: 1480 on 2016-05-19

This answer was ACCEPTED on the original site

Post score: 3

Original comments

Comment by Mr. Kro on 2016-05-25:
Worked like a charm! Thank you very much.


Rosanswers logo

Thanks to @MicaelKorn I could get the RGBDSLAM work on the Kinect v2. Just to summarize:

Steps to run RGBDSLAM with a Kinect One (Kinect v2)

  1. Install RGBDSLAM v2 indigo on ROS indigo https://github.com/felixendres/rgbdslam_v2
  2. Install libfreenect2 and iai_kinect2 https://github.com/OpenKinect/libfreenect2 and https://github.com/code-iai/iai_kinect2
  3. Create a file named rgbdslam_kinect2.launch with contents like below.
  4. Run roslaunch rgbdslam rgbdslam_kinect2.launch and rosrun kinect2_bridge kinect2_bridge.launch from different Terminal windows

Now the RGBDSLAM GUI should appear and does its work.


<param name="config/topic_image_depth"             value="/kinect2/qhd/image_depth_rect"/>

<param name="config/topic_points"                  value=""/> <!--if empty, poincloud will be reconstructed from image and depth -->

<!-- These are the default values of some important parameters -->
<param name="config/feature_extractor_type"        value="SIFTGPU"/><!-- also available: SIFT, SIFTGPU, SURF, SURF128 (extended SURF), ORB. -->
<param name="config/feature_detector_type"         value="SIFTGPU"/><!-- also available: SIFT, SURF, GFTT (good features to track), ORB. -->
<param name="config/detector_grid_resolution"      value="3"/><!-- detect on a 3x3 grid (to spread ORB keypoints and parallelize SIFT and SURF) -->

<param name="config/optimizer_skip_step"           value="15"/><!-- optimize only every n-th frame -->
<param name="config/cloud_creation_skip_step"      value="2"/><!-- subsample the images' pixels (in both, width and height), when creating the cloud (and therefore reduce memory consumption) -->

<param name="config/backend_solver"                value="csparse"/><!-- pcg is faster and good for continuous online optimization, cholmod and csparse are better for offline optimization (without good initial guess)-->

<param name="config/pose_relative_to"              value="first"/><!-- optimize only a subset of the graph: "largest_loop" = Everything from the earliest matched frame to the current one. Use "first" to optimize the full graph, "inaffected" to optimize only the frames that were matched (not those inbetween for loops) -->

<param name="config/maximum_depth"           value="2"/>
<param name="config/subscriber_queue_size"         value="20"/>

<param name="config/min_sampled_candidates"        value="30"/><!-- Frame-to-frame comparisons to random frames (big loop closures) -->
<param name="config/predecessor_candidates"        value="20"/><!-- Frame-to-frame comparisons to sequential frames-->
<param name="config/neighbor_candidates"           value="20"/><!-- Frame-to-frame comparisons to graph neighbor frames-->
<param name="config/ransac_iterations"             value="140"/>

<param name="config/g2o_transformation_refinement"           value="1"/>
<param name="config/icp_method"           value="gicp"/>  <!-- icp, gicp ... -->

<param name="config/max_rotation_degree"           value="20"/>
<param name="config/max_translation_meter"           value="0.5"/>

<param name="config/min_matches"           value="30"/>   

<param name="config/min_translation_meter"           value="0.05"/>
<param name="config/min_rotation_degree"           value="3"/>
<param name="config/g2o_transformation_refinement"           value="2"/>
<param name="config/min_rotation_degree"           value="10"/>

<param name="config/matcher_type"         value="SIFTGPU"/>

Originally posted by Mr. Kro with karma: 15 on 2016-05-25

This answer was NOT ACCEPTED on the original site

Post score: 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.