Ask Your Question
0

Error: Different number of openni2 sensors found.

asked 2020-07-02 01:42:08 -0500

dh_zh gravatar image

updated 2020-07-02 02:35:09 -0500

gvdhoorn gravatar image

Now I works on a real turtlebot with kinect v1 rgbd camera, and I meet somethings interesting. Then I unplug everything such as kobuki usb cable, kenect usb cable, logitech bluetooth receiver ... So, there is just a PC alone with ubuntu 14.04 and ros indigo. Now, start troubleshooting as below.

Step1,
without roscore running and type ROSWTF, get infomation listed below:

d1404@master230:~$ roswtf

Loaded plugin tf.tfwtf
Loaded plugin openni2_launch.wtf_plugin
No package or stack in context
Static checks summary:
No errors or warnings

Step2, with roscore running:

d1404@master230:~$ roswtf 

Loaded plugin tf.tfwtf
Loaded plugin openni2_launch.wtf_plugin
No package or stack in context
Static checks summary:
No errors or warnings

Beginning tests of your ROS graph. These may take awhile...
analyzing graph...
... done analyzing graph
running graph rules...
... done running graph rules

Online checks summary:
Found 1 warning(s).
Warnings are things that may be just fine, but are sometimes at fault

WARNING The following node subscriptions are unconnected:
 * /rosout:
 * /rosout

Found 1 error(s).
ERROR Different number of openni2 sensors found.
 * 0 openni2 sensors found (expected: 1).

ROS Master does not appear to be running.
Online graph checks will not be run.
ROS_MASTER_URI is [http://master230:11311]

So I wonder why this openni2 error occured and how to solve it? Thanks advanced!

edit retag flag offensive close merge delete

Comments

btw, even with kinect camera usb connected , when running roscore then type roswtf willstill get the same error: Found 1 error(s). ERROR Different number of openni2 sensors found. * 0 openni2 sensors found (expected: 1).

so i wanto know why there is the "Loaded plugin openni2_launch.wtf_plugin" ?

dh_zh gravatar image dh_zh  ( 2020-07-01 21:04:44 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-07-03 01:00:49 -0500

dh_zh gravatar image

Thank you Delb for your detailed insight

After apt-get removing the packages ,everything goes OK

edit flag offensive delete link more
0

answered 2020-07-02 08:13:59 -0500

Delb gravatar image
ROS Master does not appear to be running.

You might have another issue with your ROS_MASTER_URI, if all was propperly set up you shouldn't get this message.

About your issue with openni2 it comes from the fact that roswtf automatically load plugins as soon as a package has this in its package.xml :

<roswtf plugin="PLUGIN_NAME" />

Grepping "roswtf plugin" in /opt/ros/DISTRO/share gives you two results which corresponds to the first two lines of roswtf ouput :

tf/package.xml:    <roswtf plugin="tf.tfwtf" />
openni2_launch/package.xml:    <roswtf plugin="openni2_launch.wtf_plugin" />

And now you can locate the file wtf_plugin in your system and find the script in /opt/ros/kinetic/lib/python2.7/dist-packages/openni2_launch/. Looking into the script there is this line 81 :

num_sensors_expected = rospy.get_param("openni2_num_sensors_expected", 1)

so the default value is set to 1, since you are just running roscore the param isn't set which directly lead to the error message.

You can uninstall the package openni2_launch to get rid of this if you don't use it. Or you can set the param to 0 with rosparam set openni2_num_sensors_expected 0 after running roscore or by adding <param name="openni2_num_sensors_expected" value="0"/> in your launch file.

Or you can also run roswtf --no-plugins but then it would mean that you don't use the tf plugin which can be useful.

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: 2020-07-01 21:01:42 -0500

Seen: 330 times

Last updated: Jul 03 '20