0
$\begingroup$

Rosanswers logo

hi,Im trying to get depth image and RGB image from the Kinect,i followed the step below : Installing ROS for Kinect.

This document describes how to install ROS in order to use the Kinect and the KinectROSPackage program.

  1. Installing Ubuntu 10.10.

ROS is fully compatible with Ubuntu only. ROS has some distributions, the recommended one is called Diamondback. ROS Diamondback works with Ubuntu 10.04, 10.10 and 11.04. As the compatibility with 11.04 is very recent this document describes the process for 10.10.

  1. Installing GIT and Mercurial.

During the installation you may have errors returning messages that ask for 'git' (for GIT) or 'hg' (for Mercurial). In such cases just type 'git' or 'hg' in the terminal, the terminal will return how to install these.

  1. Installing ROS Diamondback.

Instructions are here: http://www.ros.org/wiki/diamondback/Installation/Ubuntu . However I list all the steps below.

3.1 Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse".

3.2 Type this in the terminal so that the computer accepts software from ROS.org: sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu maverick main" > /etc/apt/sources.list.d/ros-latest.list'

3.3 And then: wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

3.4 And then: sudo apt-get update

3.5 To actually install ROS type: sudo apt-get install ros-diamondback-desktop-full

3.6 Finally add "source /opt/ros/diamondback/setup.bash" at the end of the .bashrc by typing: echo "source /opt/ros/diamondback/setup.bash" >> ~/.bashrc . ~/.bashrc

  1. Installing rabbitVCS, a version control system for Ubuntu that will allow us to get the KinectROSPackage.

Just type these lines one by one: sudo add-apt-repository ppa:rabbitvcs/ppa sudo apt-get update sudo apt-get install rabbitvcs-cli rabbitvcs-core rabbitvcs-gedit rabbitvcs-nautilus

  1. Installing KinectROSPackage

Here we will create a new ROS package, add the KinectROSPackage source code and compile everything. You can find information about creating packages in the ROS tutorials: http://www.ros.org/wiki/ROS/Tutorials .

5.1 When ROS looks for stacks or packages it uses the ROS_PACKAGE_PATH. A package or stack created out of this ROS_PACKAGE_PATH won't be detected by ROS. By default its value is /opt/ros/diamondback/stacks but this path contains the base installation of ROS and we'd better not modify it. We will extend the ROS_PACKAGE_PATH to another directory. Let's say that you want to create the KinectROSPackage in the /home/user/KinectSensor directory. Once you have created this directory you have to modify the ROS_PACKAGE_PATH by typing in the terminal: export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/home/user/KinectSensor

This will modify the path for the running terminal. To have this path changed every time you open a new terminal you have to change your .bashrc file. To find the .bashrc file go in your /home/user directory and display the hidden files (ctrl+h or View->Show Hidden Files). Open the file with a text editor and add: export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/home/user/KinectSensor

at the end of it. Save the file. Every new terminal opened will export the ROS_PACKAGE_PATH as wanted.

5.2 In the terminal "cd" to the KinectSensor directory and type: roscreate-pkg KinectROSPackage

An empty ROS package named KinectROSPackage is created.

5.3 To fill your KinectROSPackage you have to have available the content of the original package somewhere. So, create a folder somewhere and using RabbitVCS checkout the KinectROSPackage located in https://10.80.30.63/svn/development/KinectSensor/trunk/ .

5.4 In the KinectROSPackage that you created replace the manifest.xml with the manifest.xml included in the KinectROSPackage that you just checked out. This file specify the dependencies of the KinectROSPackage so ROS can install them later.

5.5 Also replace the CMakeLists.txt. This file specify which executable to create, using which source code and libraries etc.

5.6 Paste in the KinectROSPackage the src and launch folders. These contains the source codes for the executables and the launch file.

5.7 Install all the dependencies by typing in the terminal: rosdep install KinectROSPackage

5.8 Compile everything with: rosmake KinectROSPackage

  1. Using KinectROSPackage

The KinectROSPackage can display and save color and 3D (depth and point cloud) data from the Kinect. When the user launches the program he has to specify where to save the data. The user can also specify if he doesn't want to subscribe to one or two of the available data (RGB, Depth and Point Cloud).

6.1 Plug the Kinect.

6.2 The KinectROSPackage program (KinectROSNode) requires the openni_camera driver to be running to work. To run everything you just have to type: roslaunch KinectROSPackage KinectROSLaunch.launch saving_path:=/where/to/save

If you don't want to subscribe to one of the available data you can add rgb:=false , depth:=false or point_cloud:=false .

6.3 The program embeds one or two windows (for the RGB and the Depth images). If you right-click on the images the program returns in the terminal the available information for the pointed pixel (depth or point cloud coordinates).

6.4 To save data once press the 'o' key. One of the embedded windows has to be selected.

6.5 To save data continuously press 's' and the space bar to stop. Once again one of the embedded windows has to be selected. The key may be less sensitive when the program is running and you may have to press the space bar several times to actually stop the saving.

6.6 You can kill the program by pressing ctrl+c.

but at the end I keep getting the following message: no devices connected !! even if the kinect is plugged. can anyone give me a clue,advice,notice about this...thanks in advance


Originally posted by bassim on ROS Answers with karma: 1 on 2011-10-25

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

posting the question twice will not get you a faster answer, please follow the guidelines at http://www.ros.org/wiki/Support


Originally posted by mmwise with karma: 8372 on 2011-10-25

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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