Ask Your Question
2

openni2_launch ASUS Xtion 2 No devices connected

asked 2017-08-31 03:15:08 -0500

JoaquinF gravatar image

updated 2017-09-01 01:45:02 -0500

Hi everyone,

I attempted to connect ASUS Xtion 2 with openni2.launch, but I could not.
And I received the following ROS_INFO message.

PARAMETERS
 * /camera/camera_nodelet_manager/num_worker_threads: 4
 * /camera/depth_rectify_depth/interpolation: 0
 * /camera/driver/auto_exposure: True
 * /camera/driver/auto_white_balance: True
 * /camera/driver/color_depth_synchronization: False
 * /camera/driver/depth_camera_info_url:
 * /camera/driver/depth_frame_id: camera_depth_opti...
 * /camera/driver/depth_registration: False
 * /camera/driver/device_id: #1
 * /camera/driver/rgb_camera_info_url:
 * /camera/driver/rgb_frame_id: camera_rgb_optica...
 * /rosdistro: indigo
 * /rosversion: 1.11.21

NODES
  /camera/
    camera_nodelet_manager (nodelet/nodelet)
    depth_metric (nodelet/nodelet)
    depth_metric_rect (nodelet/nodelet)
    depth_points (nodelet/nodelet)
    depth_rectify_depth (nodelet/nodelet)
    depth_registered_sw_metric_rect (nodelet/nodelet)
    driver (nodelet/nodelet)
    points_xyzrgb_sw_registered (nodelet/nodelet)
    register_depth_rgb (nodelet/nodelet)
    rgb_rectify_color (nodelet/nodelet)
  /
    camera_base_link (tf/static_transform_publisher)
    camera_base_link1 (tf/static_transform_publisher)
    camera_base_link2 (tf/static_transform_publisher)
    camera_base_link3 (tf/static_transform_publisher)

auto-starting new master
process[master]: started with pid [24252]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to d70c95f0-8c9d-11e7-98a5-9c4e36cd2e30
process[rosout-1]: started with pid [24272]
started core service [/rosout]  
process[camera/camera_nodelet_manager-2]: started with pid [24283]
process[camera/driver-3]: started with pid [24289]
process[camera/rgb_rectify_color-4]: started with pid [24291]
process[camera/depth_rectify_depth-5]: started with pid [24292]
process[camera/depth_metric_rect-6]: started with pid [24311]
process[camera/depth_metric-7]: started with pid [24326]
process[camera/depth_points-8]: started with pid [24336]
process[camera/register_depth_rgb-9]: started with pid [24339]
process[camera/points_xyzrgb_sw_registered-10]: started with pid [24359]
process[camera/depth_registered_sw_metric_rect-11]: started with pid [24365]
process[camera_base_link-12]: started with pid [24376]
process[camera_base_link1-13]: started with pid [24403]
process[camera_base_link2-14]: started with pid [24413]
process[camera_base_link3-15]: started with pid [24439]
[ERROR] [1503999521.814253704]: Skipping XML Document "/opt/ros/indigo/share/swri_transform_util/nodelet_plugins.xml" which had no Root Element.  This likely means the XML is malformed or missing.  
[ INFO] [1503999521.821898422]: Initializing nodelet with 4 worker threads.  
[ INFO] [1503999522.394933929]: No matching device found.... waiting for devices. Reason: std::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/binarydeb/ros-indigo-openni2-camera-0.2.7/src/openni2_driver.cpp @ 631 : Invalid device number 1, there are 0 devices connected.

And CMakeLists.txt in openni2_camera.

cmake_minimum_required(VERSION 2.8.3)
project(openni2_camera)

find_package(catkin REQUIRED camera_info_manager dynamic_reconfigure image_transport  nodelet sensor_msgs roscpp message_generation)

find_package(Boost REQUIRED COMPONENTS system thread)

find_package(PkgConfig)

# pkg_check_modules(PC_OPENNI2 libOpenNi2)
# if (NOT PC_OPENNI2_FOUND)
#   pkg_check_modules(PC_OPENNI2 REQUIRED openni2)
# endif()

generate_dynamic_reconfigure_options(cfg/OpenNI2.cfg)
add_service_files(FILES
  GetSerial.srv)
generate_messages()

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES openni2_wrapper
  CATKIN_DEPENDS camera_info_manager dynamic_reconfigure image_transport nodelet sensor_msgs roscpp message_runtime
  DEPENDS libOpenNI2
)

include_directories(include
                    ${catkin_INCLUDE_DIRS}
                    ${Boost_INCLUDE_DIRS}
                    /home/myname/xtion2/ASUS-Linux-x64-OpenNI2.2/Include
                    )

link_directories(/home/myname/xtion2/ASUS-Linux-x64-OpenNI2.2/Redist)

find_path(OPENNI2_INCLUDE_PATH NAMES OpenNI.h
  PATHS
    /home/myname/xtion2/ASUS-Linux-x64-OpenNI2.2/Include
)

find_library(OPENNI2_LIBRARY NAMES OpenNI2 libOpenNI2
  PATHS
    /home/myname/xtion2/ASUS-Linux-x64-OpenNI2.2/Redist
)

add_library(openni2_wrapper
   src/openni2_convert.cpp
   src/openni2_device.cpp
   src/openni2_device_info.cpp
   src/openni2_timer_filter.cpp
   src/openni2_frame_listener.cpp
   src/openni2_device_manager.cpp
   src/openni2_exception.cpp
   src/openni2_video_mode.cpp
)
target_link_libraries(openni2_wrapper ${catkin_LIBRARIES} ${OPENNI2_LIBRARY} ${Boost_LIBRARIES} )

add_executable(test_wrapper test/test_wrapper.cpp )
target_link_libraries(test_wrapper openni2_wrapper ${Boost_LIBRARIES})

add_library(openni2_driver_lib
   src/openni2_driver.cpp
)
target_link_libraries(openni2_driver_lib openni2_wrapper ${catkin_LIBRARIES} ${Boost_LIBRARIES} )
add_dependencies(openni2_driver_lib ${PROJECT_NAME}_gencfg ${PROJECT_NAME}_generate_messages_cpp)

add_library(openni2_camera_nodelet
   ros/openni2_camera_nodelet.cpp
)
target_link_libraries(openni2_camera_nodelet openni2_driver_lib ${catkin_LIBRARIES} ${Boost_LIBRARIES} )
add_dependencies(openni2_camera_nodelet ${PROJECT_NAME}_gencfg)

add_executable(openni2_camera_node
   ros/openni2_camera_node.cpp
)
target_link_libraries(openni2_camera_node openni2_driver_lib ${catkin_LIBRARIES} ${Boost_LIBRARIES} )
add_dependencies(openni2_camera_node ${PROJECT_NAME}_gencfg ${PROJECT_NAME ...
(more)
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2017-09-03 00:50:20 -0500

JoaquinF gravatar image

updated 2017-09-03 03:54:49 -0500

Xtion2 finally worked with openni2.launch.
I replaced the modified CMakeLists.txt in openni2_camera with the original one.
And I did the following in the terminal.

$ sudo apt-get install libopenni2-dev libopenni2-0  
$ cd /home/myname/xtion2/ASUS-Linux-x64-OpenNI2.2/
$ sudo ./install.sh
$ sudo cp Redist/OpenNI2/Drivers/libSenDuck.so /usr/lib/OpenNI2/Drivers/
edit flag offensive delete link more

Comments

1

your comment really helps me, but the last line might be a typo. Now I could run Xtion 2 on Indigo.

$ sudo cp Redist/ASUS/Xtion2/lib/libSenDuck.so /usr/lib/OpenNI2/Drivers/

knorth55 gravatar imageknorth55 ( 2017-10-12 01:11:22 -0500 )edit

Did your comment also have a typo? I had:

# cp ~/Downloads/ASUS-Linux-x64-OpenNI2.2/ASUS/Xtion2/lib/libSenDuck.so /usr/lib/OpenNI2/Drivers/

calvertdw gravatar imagecalvertdw ( 2019-07-03 11:38:25 -0500 )edit
0

answered 2018-11-16 12:54:14 -0500

130s gravatar image

Please be sure to describe the environment you're running, although this time thanks to your verbose output (nice!) I can tell you're on ROS Indigo, and you're probably using binary version ros-indigo-openni2-camera-0.2.7 of the openni2 driver package.

In your self answer:

$ sudo apt-get install libopenni2-dev libopenni2-0

Those should be automatically installed. In the package's dependency, libopenni2-dev is specified, which depends on libopenni2-0 (see the output below).

I'd say you may have messed binary installation somehow. In these case it might help to reinstall packages, by e.g. apt-get install --reinstall.

$ apt-cache depends libopenni2-dev 
libopenni2-dev
  Depends: libopenni2-0
  Suggests: openni2-doc
  Conflicts: libopenni2-dev:i386
$ apt-cache policy libopenni2-dev 
libopenni2-dev:
  Installed: 2.2.0.33+dfsg-1~ubuntu14.04.1
  Candidate: 2.2.0.33+dfsg-1~ubuntu14.04.1
  Version table:
 *** 2.2.0.33+dfsg-1~ubuntu14.04.1 0
        500 http://packages.ros.org/ros-shadow-fixed/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
edit flag offensive delete link more
0

answered 2018-11-16 12:33:09 -0500

Thiva gravatar image

Hi I have followed the exact same procedure but I am getting following error. Can't open depth camera. Any idea whats the problem is? Thanks

PARAMETERS * /camera/camera_nodelet_manager/num_worker_threads: 4 * /camera/depth_rectify_depth/interpolation: 0 * /camera/driver/color_depth_synchronization: False * /camera/driver/color_mode: 5 * /camera/driver/depth_camera_info_url: * /camera/driver/depth_frame_id: camera_depth_opti... * /camera/driver/depth_mode: 5 * /camera/driver/depth_registration: False * /camera/driver/device_id: #1 * /camera/driver/id_manufacturer: 1d27 * /camera/driver/id_product: 0601 * /camera/driver/ir_mode: 5 * /camera/driver/rgb_camera_info_url: * /camera/driver/rgb_frame_id: camera_rgb_optica... * /rosdistro: melodic * /rosversion: 1.14.3

NODES /camera/ camera_nodelet_manager (nodelet/nodelet) depth_metric (nodelet/nodelet) depth_metric_rect (nodelet/nodelet) depth_points (nodelet/nodelet) depth_rectify_depth (nodelet/nodelet) depth_registered_sw_metric_rect (nodelet/nodelet) driver (nodelet/nodelet) points_xyzrgb_sw_registered (nodelet/nodelet) register_depth_rgb (nodelet/nodelet) rgb_rectify_color (nodelet/nodelet) / camera_base_link (tf2_ros/static_transform_publisher) camera_base_link1 (tf2_ros/static_transform_publisher) camera_base_link2 (tf2_ros/static_transform_publisher) camera_base_link3 (tf2_ros/static_transform_publisher)

auto-starting new master process[master]: started with pid [16254] ROS_MASTER_URI=http://localhost:11311

setting /run_id to e9ae15bc-e9cb-11e8-b9d5-309c231f9233 process[rosout-1]: started with pid [16265] started core service [/rosout] process[camera/camera_nodelet_manager-2]: started with pid [16268] process[camera/driver-3]: started with pid [16273] process[camera/rgb_rectify_color-4]: started with pid [16274] process[camera/depth_rectify_depth-5]: started with pid [16275] process[camera/depth_metric_rect-6]: started with pid [16281] process[camera/depth_metric-7]: started with pid [16287] process[camera/depth_points-8]: started with pid [16293] process[camera/register_depth_rgb-9]: started with pid [16304] process[camera/points_xyzrgb_sw_registered-10]: started with pid [16315] process[camera/depth_registered_sw_metric_rect-11]: started with pid [16322] process[camera_base_link-12]: started with pid [16328] process[camera_base_link1-13]: started with pid [16333] process[camera_base_link2-14]: started with pid [16343] process[camera_base_link3-15]: started with pid [16347] Video Camera at /dev/video0 Detected Cannot identify '/dev/video1': 2, No such file or directory Can't open depth camera! [camera/camera_nodelet_manager-2] process has died

edit flag offensive delete link more

Comments

You're posting a question in the answer section. Instead please open a new question, otherwise your question will get less answers.

130s gravatar image130s ( 2018-11-16 12:41:30 -0500 )edit

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: 2017-08-31 03:03:34 -0500

Seen: 3,118 times

Last updated: Nov 16 '18