|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
SmartDashboard can't connect to Axis Camera
My team has been trying unsuccessfully for the last two years to get the Axis camera to work with the WPICamera extension in SmartDashboard.
I started the dashboard from the command line in order to see error output, and I have been consistently seeing this error for some unknown reason: Code:
edu.wpi.first.wpijavacv.WPICamera$BadConnectionException
at edu.wpi.first.wpijavacv.WPICamera.getNewImage(WPICamera.java:128)
at edu.wpi.first.smartdashboard.camera.WPICameraExtension$BGThread.run(WPICameraExtension.java:68
[mjpeg @ 04BE2D70] max_analyze_duration reached
[mjpeg @ 04BE2D70] Estimating duration from bitrate, this may be inaccurate
Input #0, mjpeg, from 'http://10.13.50.11/mjpg/video.mjpg':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj420p, 320x240 [PAR 1:1 DAR 4:3], 25 fps, 25 tbr, 1200k tbn, 25 tbc
[swscaler @ 0A16C470] No accelerated colorspace conversion found from yuv420p to bgr24.
Time is running short to actually start testing algorithms and our shooting platform, so a fast response would be very much appreciated. |
|
#2
|
|||
|
|||
|
Re: SmartDashboard can't connect to Axis Camera
If the sources are available for the WPIJavaCV library I would be willing to dive into that to try and debug what is happening. It appears that none of the code is available at FirstForge, which really surprises me (or at least it's not allowing my user account there any access).
If I leave the dashboard up for a long time (several minutes), it eventually seems to grab a connection to the camera and displays fine from that point on. Perhaps some issue with a timeout not being set generously enough? Our camera's frame rate can sometimes hiccup when being viewed from a browser, but I don't see why that would cause connection issues. |
|
#3
|
|||
|
|||
|
Re: SmartDashboard can't connect to Axis Camera
Are you using a 206?
|
|
#4
|
|||
|
|||
|
Re: SmartDashboard can't connect to Axis Camera
|
|
#5
|
|||
|
|||
|
Re: SmartDashboard can't connect to Axis Camera
Yeah, we're having similar issues. Works fine with the M1011, 206 is quite intermittent.
On our Thursday meeting we had the 206 in working order (however with some occasional connection failures), came back this morning with output cycling between "No accelerated colorspace" and connection failure. |
|
#6
|
|||
|
|||
|
Re: SmartDashboard can't connect to Axis Camera
Ah, well this is good news then. We just ordered an M1011 to have a backup camera for competition and to test that the issue wasn't with our 206. Hopefully we will have the same experience as you and the M1011 will work consistently.
Do you happen to know if the source for WPIJavaCV + WPICameraExtension is available? I would really like to get to the bottom of its behavior with the 206. I also have reason to believe that there's a resource leak in the code as well. Running for ~20 minutes after streaming begins results in SmartDashboard crashing with a DirectByteBuffer.get call failing. |
|
#7
|
|||
|
|||
|
Re: SmartDashboard can't connect to Axis Camera
Just to make one final post here:
We've received an M1011 camera and confirmed that the 206 is indeed a very unreliable camera for connecting to SmartDashboard. The new camera works every time that we boot up a WPICameraExtension widget. |
|
#8
|
|||
|
|||
|
Re: SmartDashboard can't connect to Axis Camera
Quote:
|
|
#9
|
|||
|
|||
|
Re: SmartDashboard can't connect to Axis Camera
It definitely seems like there's a good amount of flakiness with the WPICameraExtension. I'm disheartened that the author has yet to post; all I would like is the source to this to be able to debug the issue for everyone that's facing it.
It may even be something as simple as a connection timeout that needs to be adjusted - because once the feed is established it remains up without issue, correct? If someone is aware of who the author is (Brad Miller?), can someone PM him to please take a look at this thread? EDIT: Or if someone is aware of how to obtain the source to build everything, that works too. Last edited by jarruda : 02-12-2013 at 10:56 AM. |
|
#10
|
|||
|
|||
|
Re: SmartDashboard can't connect to Axis Camera
Quote:
Code:
ffplay -f mjpeg -i http://10.0.63.11/mjpg/video.mjpg Code:
C:\MinGW\bin>ffplay -f mjpeg -i http://10.0.63.11/mjpg/video.mjpg
FFplay version git-N-29181-ga304071, Copyright (c) 2003-2011 the FFmpeg develope
rs
built on Apr 18 2011 21:32:50 with gcc 4.5.2
configuration: --disable-static --enable-shared --enable-gpl --enable-version3
--enable-runtime-cpudetect --enable-memalign-hack --enable-avisynth --enable-bz
lib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enab
le-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable
-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-
libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --e
nable-zlib --cross-prefix=i686-w64-mingw32- --target-os=mingw32 --arch=x86_32 --
extra-cflags=-I/home/kyle/software/ffmpeg/external-libraries/win32/include --ext
ra-ldflags=-L/home/kyle/software/ffmpeg/external-libraries/win32/lib --pkg-confi
g=pkg-config
libavutil 50. 40. 1 / 50. 40. 1
libavcodec 52.120. 0 / 52.120. 0
libavformat 52.108. 0 / 52.108. 0
libavdevice 52. 4. 0 / 52. 4. 0
libavfilter 1. 79. 0 / 1. 79. 0
libswscale 0. 13. 0 / 0. 13. 0
[mjpeg @ 0057D010] max_analyze_duration reached
[mjpeg @ 0057D010] Estimating duration from bitrate, this may be inaccurate
Input #0, mjpeg, from 'http://10.0.63.11/mjpg/video.mjpg':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj420p, 640x480 [PAR 1:1 DAR 4:3], 25 fps, 25 t
br, 1200k tbn, 25 tbc
[ffsink @ 004A1940] auto-inserting filter 'auto-inserted scaler 0' between the f
ilter 'src' and the filter 'out'
[scale @ 004A1980] w:640 h:480 fmt:yuvj420p -> w:640 h:480 fmt:yuv420p flags:0x4
74.85 A-V: 0.000 s:79.7 aq= 0KB vq= 0KB sq= 0B f=0/0 /0
|
|
#11
|
|||
|
|||
|
Re: SmartDashboard can't connect to Axis Camera
Our team is having the same kinds of problems. SmartDashboard crashes and camera feed issues. I don't know enough about either to do useful debug, but I did figure out how to get to the SmartDashboard source code. I've attached a document explaining how to use it from NetBeans. It may not be 100% correct, but should be enough to get you going. I don't know what version of source was used to build the 1.0.4 installer; it doesn't seem to be documented anywhere.... Hope someone can actually FIX the problem!
|
|
#12
|
|||
|
|||
|
Re: SmartDashboard can't connect to Axis Camera
I created a ticket for this on the FIRSTForge project for WPILib (albeit it appears to be a SmartDashboard project issue).
http://firstforge.wpi.edu/sf/go/artf...3608510482 20 Kevin O'Connor stated that the issue is known and a fix is in the works. It may help to make any camera setting changes you can to improve the frame rate form the camera, as the issue appears more often when the frame rate drops below 25fps. I noticed the feed is much smoother on the 1011 than the 206 when viewing from a browser. The source is also available as part of the SmartDashboard code here (FIRSTForge account needed): http://firstforge.wpi.edu/integratio...ystem=exsy1002 Once my team's code is complete I can dedicate some time to trying to debug the extension, but hopefully this will help anyone else experiencing the issue in the meantime. |
|
#13
|
|||
|
|||
|
New SmartDashboard Posted!
From Mr O'Conner:
Quote:
|
|
#14
|
|||
|
|||
|
SmartDashboard 1.0.5 resolved our problems with the Axis 206. Works great!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|