Ask Your Question
0

can not use iai_kinect2 in ROS

asked 2018-03-16 03:16:27 -0500

updated 2018-03-16 03:17:22 -0500

I want to use kinect2 in ROS, firstly , I can install libfreenect2 successfully, and view normally ,According to the turtorial ,

cd ~/catkin_ws/src/
git clone https://github.com/code-iai/iai_kinect2.git
cd iai_kinect2
rosdep install -r --from-paths .
cd ~/catkin_ws
catkin_make -DCMAKE_BUILD_TYPE="Release"

I can download iai_kinect2 source code and put in right path successfully, but when I execute rosdep install -r --from-paths . I got unexpected error ,

ubuntu@ubuntu-ThinkPad-T460p:~/Faraway/src/iai_kinect2$ rosdep install -r --from-paths .
dpkg-query: no packages found matching libpcl-dev
dpkg-query: no packages found matching ros-kinetic-depth-image-proc
dpkg-query: no packages found matching ros-kinetic-compressed-depth-image-transport
dpkg-query: no packages found matching ros-kinetic-cv-bridge
dpkg-query: no packages found matching ros-kinetic-compressed-image-transport
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
kinect2_viewer: Cannot locate rosdep definition for [kinect2_bridge]
iai_kinect2: Cannot locate rosdep definition for [kinect2_registration]
kinect2_calibration: Cannot locate rosdep definition for [kinect2_bridge]
kinect2_bridge: Cannot locate rosdep definition for [kinect2_registration]
Continuing to install resolvable dependencies...
dpkg-query: no packages found matching ros-kinetic-depth-image-proc
dpkg-query: no packages found matching ros-kinetic-compressed-depth-image-transport
dpkg-query: no packages found matching libpcl-dev
dpkg-query: no packages found matching ros-kinetic-compressed-image-transport
dpkg-query: no packages found matching ros-kinetic-cv-bridge
executing command [sudo -H apt-get install ros-kinetic-depth-image-proc]
[sudo] password for ubuntu: 
Traceback (most recent call last):
  File "/usr/bin/rosdep", line 4, in <module>
    rosdep_main()
  File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 137, in rosdep_main
    exit_code = _rosdep_main(args)
  File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 383, in _rosdep_main
    return _package_args_handler(command, parser, options, args)
  File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 477, in _package_args_handler
    return command_handlers[command](lookup, packages, options)
  File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 689, in command_install
    installer.install(uninstalled, **install_options)
  File "/usr/lib/python2.7/dist-packages/rosdep2/installers.py", line 520, in install
    verbose=verbose, quiet=quiet)
  File "/usr/lib/python2.7/dist-packages/rosdep2/installers.py", line 570, in install_resolved
    result = subprocess.call(sub_command)
  File "/usr/lib/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 1392, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
    return func(*args)
KeyboardInterrupt

nextly , I can not catkin_make successfully , as a result , I can not view from kinect2 in ROS , who does meet the same question, and how to fix it , thx

edit retag flag offensive close merge delete

Comments

Did you check the 2nd note about setting correct path for libfreenect2 ?

If you installed libfreenect2 somewhere else than in $HOME/freenect2 or a standard location like /usr/local you have to specify the path to it by adding -Dfreenect2_DIR=path_to_freenect2/lib/cmake/freenect2 to catkin_make

tuandl gravatar imagetuandl ( 2018-03-16 04:51:07 -0500 )edit

thank you in advance,in fact,i meet error when i execute the command rosdep install -r --from-paths .

HRG-lsw gravatar imageHRG-lsw ( 2018-03-16 07:32:05 -0500 )edit

It's most likely that you forgot to source ~/catkin_ws/devel/setup.bash before running rosdep.

gvdhoorn gravatar imagegvdhoorn ( 2018-03-16 07:46:34 -0500 )edit

I am sorry , according to your suggestion I yet can not resolve the question , in the next , I plan to re-install ros kinetic version , I hope I can solve the strange question

HRG-lsw gravatar imageHRG-lsw ( 2018-03-22 03:41:20 -0500 )edit

Is there a character in your password that may be interpreted as a ctrl+c (ie: BREAK)?

gvdhoorn gravatar imagegvdhoorn ( 2018-03-22 05:56:55 -0500 )edit

yes, I press ctrl+c when pop up the following output "dpkg-query: no packages found matching libpcl-dev" , from the words , some packages can not be found , so there is no need to wait the whole error , I think

HRG-lsw gravatar imageHRG-lsw ( 2018-03-22 20:42:54 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-23 02:53:27 -0500

gvdhoorn gravatar image

yes, I press ctrl+c when pop up the following output "dpkg-query: no packages found matching libpcl-dev" , from the words , some packages can not be found , so there is no need to wait the whole error

that message is not an error.

Enter your password at the prompt and press enter. Then follow the rest of the instructions printed on the console.

Things should start to work then.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-03-16 03:16:27 -0500

Seen: 274 times

Last updated: Mar 23 '18