-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regular receipt of undersized packet. #84
Comments
Looks to me like the streams are switched - the RGB stream is 1908 data bytes/packet, and the depth stream is 1748 data bytes/packet. Perhaps stream 0x70 isn't always the depth stream? |
Maybe the USB stack is somehow padding them? We ask for 1920 bytes for both streams (because that is the iso packet size). |
I'm having the same problem, frame rate goes back up and there are no more errors when I don't pull a video feed with freenect_sync_get_video |
Also, really weird. The problem with dropping frames goes away when I plug in a usb mouse, comes back when unplugging |
Having the same problem, has anyone had any luck correcting this issue? |
I agree that there is certainly a problem with libfreenect, however the library is usable. I can use libfreenect on both ubuntu 11.10 laptop or pandaboard. However I have written code that results in minmal magic numbers and dropped frames but it requires 90% cpu utilisation. I do this by threading the process_events libfreenect function. The high cpu utilisation is due to the main thread having my image processing in a tight while loop. If I use any type of blocking call in the main thread, then libfreenect become unusable and spewing magic number errors. This is rather unacceptable as 90% cpu utilisation over a long period of time is rather undesirable. I to am interested in diving it libfreenects usb code and fixing the issue, but time is the problem. |
I'm also still having this problem with the current git master (is this an issue over 3 years old?!). If I only use a depth stream then the frames come back cleanly. If I use both depth and RGB streams simultaneously, I see choppy capture and the console messages
The dual depth+video capture is choppy on a 2013 Haswell MacBook Pro (2.6 GHz), so I doubt that it will be smooth for anyone's machine. |
This may be due to problems in the way libusb works with the USB stack on OSX. I would try booting Linux on a USB and running it there. |
I'm facing a similar problem on Pcduino (ARM). I get a constant stream of errors: [Stream 70] Invalid magic ffff And although glview shows Depth and RGB, the framerate is too slow, probably because of the drops. Can anyone suggest a solution to this? |
Small boards like that often lack USB bandwidth and/or CPU power to process Kinect data. There are Linux kernel drivers gspca_kinect (video) and librekinect (depth). Kernel-space USB has less overhead and higher throughput at the cost of platform independence. |
I get the same as the original OP. I'm running libfreenect on a Beaglebone Black rev c running Ubuntu 14.04. If I work with one stream at a time it works well - 21fps with rgb and 6-7fps with the depth stream. However if i try to work with both RGB and depth streams at the same time, I get the same error as the original OP and i receive nothing from either stream. Has any progress been made with this issue? |
@J-G-R This is a tricky issue because I've only seen it happen briefly so I can't really say what's causing it. Which example did you run to see the problem? |
I'm running a custom application written in C. It simply gets RGB and depth frames from the kinect, compresses them and then sends them back to my laptop via TCP socket. The method i'm using can be seen below:
If I delete either of the freenect_sync methods and run it it works perfectly and I receive the frames on my laptop. I've also tried separating this method into two individual methods but that doesn't work either. |
See if you get the same messages when running the freenect-camtest example (Ctrl-C to quit). |
I ran freenect-camtest for about 5 seconds and this is the result: |
So it's dropping packets even without doing work (other than First is to compile for your particular CPU and with heavy optimizations.
If that doesn't help, try fiddling with the If you get really desperate, you can also have a look at the chunk processing feature introduced in #351, which lets you downsample to a lower resolution and skip a lot of decoding. Sorry I can't be of more help. I'm 85% sure it's a hardware or USB stack issue, but it's really hard to tell. |
Hmm, I'll give your suggestions a try. I'm also thinking it's a hardware issue due to the camtest failed almost instantly. I knew the RPi wasn't able to handle libfreenect so I wen't for the beaglebone which I honestly thought would be able to keep up - 1GHz processor, 512Mb RAM - but now it looks like I'll have to go for a more powerful board. I'm thinking along the lines of an odroid which has a 1.7GHz quad core processor and 2GB of RAM. Do you think that will be enough to handle libfreenect? |
It's more an issue of USB bandwidth than CPU or RAM. According to my rough calculation, depth and video together push about 20 MB/s over USB. The ODROID is better in that regard because it has separate hosts for ethernet and USB. The U3 should be up to the job. But if you can spend $30 extra, go for XU3 Lite; I've seen a report that it even works with two Kinects, one on the 2.0 port and one on the 3.0. |
Thanks for the insight. I've decided to bite the bullet and go for the Odroid xu3 lite like you suggested. I'll post here if it's successful. |
Update: The kinect used with libfreenect works like a dream on the odroid. I'm even receiving 30 fps on my laptop over wifi, with no dropped packets. Thanks for the advice @piedar 👍 |
@J-G-R is there a way to get in contact with you? |
Streaming points and images I get the following.
The text was updated successfully, but these errors were encountered: