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

kinect in Ubuntu-VMware workstation question

asked 2012-03-28 21:21:09 -0500

Ocean gravatar image

updated 2016-10-24 09:00:10 -0500

ngrennan gravatar image

The command runs in Ubuntu-VMware workstation,and I have installed the driver of openni_kinect in ubuntu.But the results is 'no devices connected',so how can I do next? Thank you very much!

*ocean@ubuntu:~$ rosrun openni_camera openni_node

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2012-03-29 07:10:11 -0500

Shonn E gravatar image

I am running VMware Player 4 with a virtual machine of Ubuntu 11.10 and have installed openkinect libraries. I can see my Kinect and the freenect-glview demo works and displays the RGB depth image and a full color video image side by side. It is tricky to get the Ubuntu to "see" the kinect device however, as Windows 7 grabs it first when it is plugged in. But there is a pulldown in Player ... VirtualMachine-> RemovableDevices-> where the "microsoft xbox nui motor" shows up. If you select it, there is a field that says "Connect(Disconnect from host)". If I select that, it disconnects from the "host" which is Windows 7 and "Connects" to it with Ubuntu. After a few seconds, two other devices show up in this list: "microsoft xbox nui camera" and "microsoft xbox nui audio". Go through the same process to Connect to both of those as well. Once they are all connected, they should show up as little USB drive icons at the bottom of VMware Player as well. After that, the freenect-glview works (at least for me). I am on a 64 bit Dell with 32 bit virtual Ubuntu. BTW, I tried this same process running Ubuntu in Virtual Box, and never got it to see the Kinect.

edit flag offensive delete link more


Poster's point about VirtualBox is spot on, in my experience: VirtualBox has terrible virtualized USB support.

Mac gravatar image Mac  ( 2012-03-29 08:33:34 -0500 )edit

answered 2012-03-29 04:14:00 -0500

Mac gravatar image

The Kinect doesn't work in a VMWare guest (at least, it doesn't work when using the openni drivers).

This is widely-reported and reproducible.

edit flag offensive delete link more


(and very irritating, I might add)

Mac gravatar image Mac  ( 2012-03-30 10:04:36 -0500 )edit

answered 2012-04-04 03:09:55 -0500

IvanShindev gravatar image

Even if you can make the VM to connect to the Kinect, you still might not get data from it because the connection protocol is too slow. What I have is PCL-Win32 on Windows 7 and it includes the ros-sdk-electric for windows (Boost 1.44 because it is needed for the ros-sdk). I then use the PCL_IO to connect to the kinect, convert the data into PointCloud2 and I publish it. When you publish topics using the ros-win you have to setup the Linux machine as a master. I can get the published PointCloud2 data on the VM or on any Linux running machine. You can use the PointCloud2 as it is or convert it to sensor_msgs::Image or a different type of data depending on your application. As a side note, I installed the PCL from source (not the prebuild one) and replaced the sensor_msgs (PCL/trunk/common/include/sensor_msgs) with the sensor_msgs header files from my linux machine (opt/ros/electric/stacks/common_msgs/sensor_msgs/msg_gen/cpp/include/sensor_msgs). You only need to build pcl_common and pcl_io in order to connect to the kinect. You can use the pcl_openni_io example to see how to callback on XYZRGB Point and use the /pcl/ros/conversions.h to see how to convert that to PointCloud2. Do not use the toROSmsg() function provided by the pcl but copy the function directly in your code. The publishing rate is pretty high, I tested my code between 2 laptops (one windows one linux os) and it still had decent publishing rate, the rate is even higher if you use a windows host and a linux guest on a VM.

It might seem like a lot of work but having PCL with ROS running on Windows is pretty awesome, especially if you are running a VM. You can reduce the CPU load from the VM by running some code on Windows.

Hope this helps, Ivan

edit flag offensive delete link more


It truly needs a lot of work to do with VMware and also does not run well. Thank you Ivan.

Ocean gravatar image Ocean  ( 2012-04-04 05:32:46 -0500 )edit

Question Tools


Asked: 2012-03-28 21:21:09 -0500

Seen: 4,420 times

Last updated: Apr 04 '12