ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
4

openni_kinect dosen't publish anything in the topics or rviz

asked 2011-10-05 00:04:49 -0500

mobadr gravatar image

updated 2016-10-24 09:01:08 -0500

ngrennan gravatar image

Hi, I'm very new to ROS so bare with me a bit, I've just installed Electric on Ubuntu 11.04 on an Toshiba L650 laptop (ATI VGA)

I've installed opennni_kinect using the package

As I understand all I need to do is just to connect the kinect and start the openni_camera node so I did that using "roslaunch openni_camera openni_node.launch" and that kept on doing some stuff and stopped at

so I assumed everything is ok then followed the instruction to view the images on rviz but got nothing except a status warning in the point cloud2 screen in front of Topic saying "No messages received"

I checked using rostopic hz and rostopic echo for /camera/rgb/points but there is nothing there, also the global frame status indicates the status to be ok but there is nothing showing on the screen at all

I'm I missing something or is there a conflict with ATI driver or something? is there anything else rather than roscore should be running or is there any other steps before I run the node?

edit retag flag offensive close merge delete

8 Answers

Sort by ยป oldest newest most voted
3

answered 2011-10-05 02:55:03 -0500

Mac gravatar image

Try running roslaunch openni_launch openni.launch; things have be re-arranged a bit in electric.

Do the messages printed to the console indicate that the device is connected?

edit flag offensive delete link more

Comments

Thanks for your reply, unfortunately I didn't got to try it yet as I work with Kinect in the uni and I was busy with some literature review, I'll have some time tomorrow to work on the Kinect and try out the different launch file
mobadr gravatar image mobadr  ( 2011-10-10 22:27:33 -0500 )edit
I think you're right, I tried your suggestion and used rostopic echo to listen to rgb/image_raw and ir/image_raw and I got all those numbers running on the screen, so I think the driver is ok now, unfortunately rviz gives some new "Segmentation fault" so I can't see what those numbers are, thanks
mobadr gravatar image mobadr  ( 2011-10-12 01:23:34 -0500 )edit
After multiple retries I finally figured out the problem with rviz not starting, although I'm still unable to use see what I wan't in rviz but at least the openni driver does publish data in the topics, I'll just have to work on using them without using rviz
mobadr gravatar image mobadr  ( 2011-10-17 21:54:12 -0500 )edit
1

answered 2011-10-05 01:17:50 -0500

I'm getting the same problem very often. It may or may not be related to what you're seeing, but here's my take:

My observation is that it helps to quit out of all ros processes (incl. rviz) before starting the openni launch file. Once the launch file starts, wait for a couple of seconds until the driver is fully up and running, and then start rviz. It seems that if something subscribes to the topics before the openni driver is ready, things break down.

It sometimes a couple of retries before it actually works.

edit flag offensive delete link more

Comments

I am having these problems too. It often takes 5 to 10 tries to start up the openni-driver. It also doesnt matter for me if i use the new openni_launch or the older openni_camera launch files. It seems to be known and posted here already: https://kforge.ros.org/openni/trac/ticket/42 Hope for a fix.
Ben_S gravatar image Ben_S  ( 2011-10-09 21:07:08 -0500 )edit
Thanks, I did tried to quit everything (Including roscore) and start over and waited for a while to make sure that the node is up and running and no other tasks are pending or in processes
mobadr gravatar image mobadr  ( 2011-10-10 22:18:52 -0500 )edit
1
Thanks Ben_S for indicating that the launch file itself is the problem, for I feared that there might be some hardware incompatibility on my laptop, I'll try modifying the launch file or using older version
mobadr gravatar image mobadr  ( 2011-10-10 22:23:18 -0500 )edit
0

answered 2011-10-12 01:46:23 -0500

John Hoare gravatar image

updated 2011-10-12 04:53:15 -0500

I've had this problem on a different laptop and the issue is that the Kinect does not work on any of the machine's USB3.0 ports, and only on the (single) USB 2.0 Port. If your machine has USB 3.0 ports try to see if it has a USB 2.0 port that you can use.

The kinect (on my system at least) does show up under the USB3.0 ports, but no data will stream. When using the USB2.0 ports, however, the kinect will show up and successfully stream data.

edit flag offensive delete link more

Comments

I have encountered the USB2/3 problem as well. However, I believe the question refers to the situation when the device is recognized correctly, but the driver fails to initialize the data stream.
Ivan Dryanovski gravatar image Ivan Dryanovski  ( 2011-10-12 03:01:21 -0500 )edit
Yes device recognized, I know cause it gave an error and I found out that I forgot to plug Kinect's power, when I did so it showed some message indicating detecting Kinect, but when I try the openni_camera launch file nothing is published in topics, but openni_launch seems to work and do same tasks
mobadr gravatar image mobadr  ( 2011-10-12 04:41:38 -0500 )edit
I've edited it in the original answer, but for my situation at least, the kinect will show up on both USB 2/3 ports, but will only stream data on the USB2 port.
John Hoare gravatar image John Hoare  ( 2011-10-12 04:54:11 -0500 )edit
Ok, my laptop don't have usb3, thanks for the info
mobadr gravatar image mobadr  ( 2011-10-12 23:40:12 -0500 )edit
0

answered 2011-10-12 01:12:51 -0500

Henning Deeken gravatar image

Hi there!

I encounter the same problems with my kinect and the openni_kinect stack.

When I found this thread i tried roslaunch openni_launch openni.launch, here's what my console says:

core service [/rosout] found
process[camera_nodelet_manager-1]: started with pid [15384]
process[camera/driver-2]: started with pid [15385]
process[camera/rgb/rectify_mono-3]: started with pid [15428]
process[camera/rgb/rectify_color-4]: started with pid [15442]
process[camera/ir/rectify_ir-5]: started with pid [15462]
process[camera/depth/rectify_depth-6]: started with pid [15479]
process[camera/depth/metric_rect-7]: started with pid [15499]
process[camera/depth/metric-8]: started with pid [15516]
process[camera/depth/disparity-9]: started with pid [15536]
process[camera/depth/points-10]: started with pid [15553]
process[camera/register_depth_rgb-11]: started with pid [15573]
process[camera/depth_registered/rectify_depth-12]: started with pid [15587]
process[camera/depth_registered/metric_rect-13]: started with pid [15601]
process[camera/depth_registered/metric-14]: started with pid [15615]
process[camera/depth_registered/disparity-15]: started with pid [15629]
process[camera/points_xyzrgb_depth_rgb-16]: started with pid [15643]
process[camera_base_link-17]: started with pid [15657]
process[camera_base_link1-18]: started with pid [15671]
[ INFO] [1318423547.968519485]: Number devices connected: 1
[ INFO] [1318423547.968680614]: 1. device on bus 001:14 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364910353049A'
[ INFO] [1318423547.970240665]: Searching for device with index = 1
[ INFO] [1318423548.023895434]: Opened 'Xbox NUI Camera' on bus 1:14 with serial number 'A00364910353049A'
[ INFO] [1318423548.047911128]: rgb_frame_id = '/camera_rgb_optical_frame' 
[ INFO] [1318423548.047960898]: depth_frame_id = '/camera_depth_optical_frame' 
[ INFO] [1318423548.052857231]: using default calibration URL
[ INFO] [1318423548.052945376]: camera calibration URL: file:///home/student/h/hdeeken/.ros/camera_info/rgb_A00364910353049A.yaml
[ERROR] [1318423548.053280770]: Unable to open camera calibration file [/home/student/h/hdeeken/.ros/camera_info/rgb_A00364910353049A.yaml]
[ WARN] [1318423548.053333713]: Camera calibration file /home/student/h/hdeeken/.ros/camera_info/rgb_A00364910353049A.yaml not found.
[ INFO] [1318423548.054645480]: using default calibration URL
[ INFO] [1318423548.054696071]: camera calibration URL: file:///home/student/h/hdeeken/.ros/camera_info/depth_A00364910353049A.yaml
[ERROR] [1318423548.054983437]: Unable to open camera calibration file [/home/student/h/hdeeken/.ros/camera_info/depth_A00364910353049A.yaml]
[ WARN] [1318423548.055043961]: Camera calibration file /home/student/h/hdeeken/.ros/camera_info/depth_A00364910353049A.yaml not found.
[ WARN] [1318423548.056337041]: Using default parameters for RGB camera calibration.
[ WARN] [1318423548.056391186]: Using default parameters for IR camera calibration.
process[camera_base_link2-19]: started with pid [15692]
process[camera_base_link3-20]: started with pid [15809]
[ERROR] [1318423551.048566026]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/compressed/set_parameters]
[ERROR] [1318423551.058408518]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/theora/set_parameters]

So it seems as if the device is recognized and the frames seem to be set up as well - I can adress all topics via rviz - but there are no msgs published via the topics.

Maybe this helps to find what's going wrong! ;)

Greetings, Henning

edit flag offensive delete link more

Comments

Have you tried restarting the node some times? I started using a second bash with rostopic hz /camera/depth_registered/points and keep restarting openni until messages arrive. Often takes 5-10 tries...
Ben_S gravatar image Ben_S  ( 2011-10-12 01:40:29 -0500 )edit
in rviz, set the fixed frame to something like /openni_rgb_optical_frame
Daniel Canelhas gravatar image Daniel Canelhas  ( 2011-10-13 09:03:31 -0500 )edit
0

answered 2011-10-22 15:33:35 -0500

asrinivasan31 gravatar image

Hi:

I am encountering the same problems as Henning's post with the error in configuration file as well as "tried to advertise service that is already advertised in this node". As a result, my rviz shows that for the pointcloud2 display the topics are not publishing any messages. Has anyone successfully resolved this issue? Restarting the driver X # of times cannot possibly be the only way... I am running Ubuntu 11.04 with rose electric and my USB ports are 2.0.

Thanks in advance

edit flag offensive delete link more

Comments

I get the same two "tried to advertise service" errors, yet there is still messages in the topics and I get the rough coloured point cloud in rviz, are you using openni_camera or openni_launch?? only openni_launch works with me
mobadr gravatar image mobadr  ( 2011-10-25 00:27:22 -0500 )edit
0

answered 2011-10-28 09:07:36 -0500

asrinivasan31 gravatar image

updated 2011-10-31 02:23:55 -0500

Update:

Now I can see the image from the camera display by adding the topic /camera/rgb/image_color topic to rviz using openni_launch openni.launch which I couldn't do before. However, the topics regarding point cloud 2 display don't ever get published.

Second Update: The point cloud2 display has started working. I don't know how (maybe it was the ros updates that I did yesterday), but I consistently can get them to display except now, rviz freezes and I get the following error repeatedly

Image messages received:      0
CameraInfo messages received: 84
Synchronized pairs:           0
Image messages received:      0
CameraInfo messages received: 92
Synchronized pairs:           0
edit flag offensive delete link more
0

answered 2011-10-27 01:04:20 -0500

asrinivasan31 gravatar image

updated 2011-10-27 01:04:57 -0500

So I ran openni_camera openni_node.launch and changed some settings in rviz to publish the raw image topic and I saw some point clouds, although it didn't look very good. I wanted to try tinkering around the settings some more, but I did a ros update and now I can't open anything! Anyone else get this error:

/opt/ros/electric/stacks/nodelet_core/nodelet/bin/nodelet: error while loading shared libraries: libtinyxml.so.2.5.3: cannot open shared object file: No such file or directory

this is very frustrating.....

edit flag offensive delete link more

Comments

The libtinyxml problem has hit a lot of people (including me), and has little to do with rviz. See http://answers.ros.org/question/2593/error-while-loading-shared-libraries for details.
Mac gravatar image Mac  ( 2011-10-28 01:50:28 -0500 )edit
Yea I fixed the xml problem.
asrinivasan31 gravatar image asrinivasan31  ( 2011-10-28 09:03:18 -0500 )edit
0

answered 2011-10-19 19:16:17 -0500

js gravatar image

using openni_launch openni.launch doesnt solve the problem..

i still observe the same as pointed out by ivan: if i wait long enough (20-30 sec), i can sometimes see data on the topics. otherwise, the node doesn't work properly and sends nothing.

i run ubuntu 10.10 with a 2.6.35 kernel and electric packages (updated today). i'm using an xtion live camera.

edit flag offensive delete link more

Comments

I don't know what you mean by "using openni_launch openni.launch doesnt solve the problem", in my case it mostly worked, I'm still having some trouble with rviz but at least the drivers publish the messages on the topics and I can make use of them with my own code or view it on image_view
mobadr gravatar image mobadr  ( 2011-10-24 23:45:27 -0500 )edit

Question Tools

Stats

Asked: 2011-10-05 00:04:49 -0500

Seen: 4,021 times

Last updated: Oct 31 '11