Go to Post Technology is everywhere, yet the human factor is what makes an event special. - synth3tk [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-01-2017, 14:01
YairZiv's Avatar
YairZiv YairZiv is offline
Registered User
FRC #5951 (Makers Assemble)
Team Role: Programmer
 
Join Date: Oct 2016
Rookie Year: 2016
Location: Tel Aviv, Israel
Posts: 41
YairZiv is an unknown quantity at this point
ioctl Errors and Intermediate Vision sample not working

ioctl Errors:
ERROR: ioctl VIDIOC_S_CTRL failed at UsbCameraProperty.cpp:72: Input/output error (UsbUtil.cpp:122)
ERROR: ioctl VIDIOC_S_EXT_CTRLS failed at UsbCameraProperty.cpp:66: Input/output error (UsbUtil.cpp:122)
ERROR: ioctl VIDIOC_S_EXT_CTRLS failed at UsbCameraProperty.cpp:66: Input/output error (UsbUtil.cpp:122)

What do they mean and how do I fix them?

Additionaly, I tried running the Intermediate VIsion example and when I changed the camera properties to the OpenCV output I got the following error:
ERROR: serve_Processed: : Too many simultaneous client streams (MjpegServerImpl.cpp:403)

What do these errors mean and how do I fix them?

Thanks in advance!
Reply With Quote
  #2   Spotlight this post!  
Unread 26-01-2017, 14:28
YairZiv's Avatar
YairZiv YairZiv is offline
Registered User
FRC #5951 (Makers Assemble)
Team Role: Programmer
 
Join Date: Oct 2016
Rookie Year: 2016
Location: Tel Aviv, Israel
Posts: 41
YairZiv is an unknown quantity at this point
Re: ioctl Errors and Intermediate Vision sample not working

Quote:
Originally Posted by YairZiv View Post
ioctl Errors:
ERROR: ioctl VIDIOC_S_CTRL failed at UsbCameraProperty.cpp:72: Input/output error (UsbUtil.cpp:122)
ERROR: ioctl VIDIOC_S_EXT_CTRLS failed at UsbCameraProperty.cpp:66: Input/output error (UsbUtil.cpp:122)
ERROR: ioctl VIDIOC_S_EXT_CTRLS failed at UsbCameraProperty.cpp:66: Input/output error (UsbUtil.cpp:122)

What do they mean and how do I fix them?

Additionaly, I tried running the Intermediate VIsion example and when I changed the camera properties to the OpenCV output I got the following error:
ERROR: serve_Processed: : Too many simultaneous client streams (MjpegServerImpl.cpp:403)

What do these errors mean and how do I fix them?

Thanks in advance!
Well, I fixed the problem that the template did not work, but the CvSource keeps sending the error that it has no connection, why does this happen?
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2017, 14:30
Thad House Thad House is offline
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,107
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: ioctl Errors and Intermediate Vision sample not working

Quote:
Originally Posted by YairZiv View Post
ioctl Errors:
ERROR: ioctl VIDIOC_S_CTRL failed at UsbCameraProperty.cpp:72: Input/output error (UsbUtil.cpp:122)
ERROR: ioctl VIDIOC_S_EXT_CTRLS failed at UsbCameraProperty.cpp:66: Input/output error (UsbUtil.cpp:122)
ERROR: ioctl VIDIOC_S_EXT_CTRLS failed at UsbCameraProperty.cpp:66: Input/output error (UsbUtil.cpp:122)

What do they mean and how do I fix them?

Additionaly, I tried running the Intermediate VIsion example and when I changed the camera properties to the OpenCV output I got the following error:
ERROR: serve_Processed: : Too many simultaneous client streams (MjpegServerImpl.cpp:403)

What do these errors mean and how do I fix them?

Thanks in advance!
For the first errors, which properties are you trying to set? There as some properties that will fail to be set if a certain other property is at a specific setting. For an example, if the exposure type is set to auto (which it is by default) any attempt to set the exposure manually will print that error. Knowing which camera, and which property you are trying to set will help debug that.

We're taking a look into the too many streams issue. For now, make sure all dashboards are closed, all internet browsers are closed, and restart the program. It seems like something is opening multiple stream connections.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2017, 14:39
YairZiv's Avatar
YairZiv YairZiv is offline
Registered User
FRC #5951 (Makers Assemble)
Team Role: Programmer
 
Join Date: Oct 2016
Rookie Year: 2016
Location: Tel Aviv, Israel
Posts: 41
YairZiv is an unknown quantity at this point
Re: ioctl Errors and Intermediate Vision sample not working

Quote:
Originally Posted by Thad House View Post
For the first errors, which properties are you trying to set? There as some properties that will fail to be set if a certain other property is at a specific setting. For an example, if the exposure type is set to auto (which it is by default) any attempt to set the exposure manually will print that error. Knowing which camera, and which property you are trying to set will help debug that.

We're taking a look into the too many streams issue. For now, make sure all dashboards are closed, all internet browsers are closed, and restart the program. It seems like something is opening multiple stream connections.
Thanks!

We fixed the too many streams issue and we got into another issue, when we try to grab the frame, it returns 0 (meaning there's an issue). The issue is that there is no connection. How do we fix that? I mean, when we use the normal camera without processing it (in the smartdashboard just setting the property to USB Camera 0) it works and shows a consistent stream. When we switch the property to the one that's processing, it starts making these errors.
Reply With Quote
  #5   Spotlight this post!  
Unread 26-01-2017, 15:40
Etienne Beaulac Etienne Beaulac is offline
Registered User
FRC #5528
 
Join Date: Jan 2015
Location: Trois-Rivieres
Posts: 1
Etienne Beaulac is an unknown quantity at this point
Re: ioctl Errors and Intermediate Vision sample not working

Quote:
Originally Posted by YairZiv View Post
Additionaly, I tried running the Intermediate VIsion example and when I changed the camera properties to the OpenCV output I got the following error:
ERROR: serve_Processed: : Too many simultaneous client streams (MjpegServerImpl.cpp:403)
Hi, our team uses C++, but we currently have the same "Too many simultaneous client streams" error when sending a CvSource to the SmartDashboard. Could you explain how you solved it? Thanks!
Reply With Quote
  #6   Spotlight this post!  
Unread 26-01-2017, 16:41
YairZiv's Avatar
YairZiv YairZiv is offline
Registered User
FRC #5951 (Makers Assemble)
Team Role: Programmer
 
Join Date: Oct 2016
Rookie Year: 2016
Location: Tel Aviv, Israel
Posts: 41
YairZiv is an unknown quantity at this point
Re: ioctl Errors and Intermediate Vision sample not working

Quote:
Originally Posted by Etienne Beaulac View Post
Hi, our team uses C++, but we currently have the same "Too many simultaneous client streams" error when sending a CvSource to the SmartDashboard. Could you explain how you solved it? Thanks!
I'm actually not quite sure, we just re-created the file and wrote it from scratch. I guess some line there was a mistake that didn't repeat.
Reply With Quote
  #7   Spotlight this post!  
Unread 27-01-2017, 00:39
avayner avayner is offline
Registered User
FRC #3501
 
Join Date: Jan 2017
Location: Sunnyvale, CA
Posts: 4
avayner is an unknown quantity at this point
Re: ioctl Errors and Intermediate Vision sample not working

We seem to be having the same issue.

We are just trying to initialize the USB camera (using Java) by doing this:

camera = CameraServer.getInstance().startAutomaticCapture()

and we are getting this:


CS: ERROR: ioctl VIDIOC_S_EXT_CTRLS failed at UsbCameraProperty.cpp:66: Input/output error (UsbUtil.cpp:122)
Exception in thread "NTListener" VideoException [edu.wpi.cscore.VideoException: property write failed]
at edu.wpi.cscore.CameraServerJNI.setProperty(Native Method)
at edu.wpi.cscore.VideoProperty.set(VideoProperty.jav a:68)
at edu.wpi.first.wpilibj.CameraServer.lambda$new$1(Ca meraServer.java:498)
at edu.wpi.first.wpilibj.CameraServer$$Lambda$2/3326003.apply(Unknown Source)
CS: USB Camera 0: set FPS to 0
CS: ERROR: ioctl VIDIOC_S_EXT_CTRLS failed at UsbCameraProperty.cpp:66: Input/output error (UsbUtil.cpp:122)
Exception in thread "NTListener" VideoException [edu.wpi.cscore.VideoException: property write failed]
at edu.wpi.cscore.CameraServerJNI.setProperty(Native Method)
at edu.wpi.cscore.VideoProperty.set(VideoProperty.jav a:68)
at edu.wpi.first.wpilibj.CameraServer.lambda$new$1(Ca meraServer.java:498)
at edu.wpi.first.wpilibj.CameraServer$$Lambda$2/3326003.apply(Unknown Source)
CS: ERROR: ioctl VIDIOC_S_CTRL failed at UsbCameraProperty.cpp:72: Input/output error (UsbUtil.cpp:122)
Exception in thread "NTListener" VideoException [edu.wpi.cscore.VideoException: property write failed]
at edu.wpi.cscore.CameraServerJNI.setProperty(Native Method)
at edu.wpi.cscore.VideoProperty.set(VideoProperty.jav a:68)
at edu.wpi.first.wpilibj.CameraServer.lambda$new$1(Ca meraServer.java:498)
at edu.wpi.first.wpilibj.CameraServer$$Lambda$2/3326003.apply(Unknown Source)
Reply With Quote
  #8   Spotlight this post!  
Unread 28-01-2017, 13:10
MikePerreman's Avatar
MikePerreman MikePerreman is offline
Registered User
FRC #0247
 
Join Date: Feb 2015
Location: Michigan
Posts: 47
MikePerreman is an unknown quantity at this point
Re: ioctl Errors and Intermediate Vision sample not working

im getting a "too many camera streams" as well. also, has anyone managed to switch cameras on the fly? mine keep throwing a fit.
__________________
Programmer - A creature known for converting Caffeine into Code.
Reply With Quote
  #9   Spotlight this post!  
Unread 31-01-2017, 21:24
skidad68 skidad68 is offline
Registered User
FRC #2506
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2013
Location: United States
Posts: 13
skidad68 is an unknown quantity at this point
Re: ioctl Errors and Intermediate Vision sample not working

Any update on the IOCTL errors? This is a problem for us too.
Reply With Quote
  #10   Spotlight this post!  
Unread 01-02-2017, 13:23
MuskieProgramme MuskieProgramme is offline
Registered User
FRC #6420
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2014
Location: Muscatine, IA
Posts: 33
MuskieProgramme is an unknown quantity at this point
Re: ioctl Errors and Intermediate Vision sample not working

Our team has a switching camera now, and one thing that I've seen is these errors. They didn't seem to affect anything, so I left the code as it was. At one point I named our cameras "Front facing" and "rear facing", but noticed there was another stream for "USB Camera 0". It took a few minutes, but I located a place in the code where I was accidentally starting a second stream for the camera with id 0. After removing this declaration, these errors disappeared.

This may or may not be your problem, a _lot_ of things in my code were being changed around and moved. I'm not certain this was the cause of the problem, so take it with a grain of salt.
Reply With Quote
  #11   Spotlight this post!  
Unread 02-02-2017, 21:48
Justin Buist Justin Buist is offline
Registered User
FRC #4003 (TriSonics)
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Allendale, MI
Posts: 27
Justin Buist is an unknown quantity at this point
Re: ioctl Errors and Intermediate Vision sample not working

Quote:
Originally Posted by avayner View Post
We seem to be having the same issue.

We are just trying to initialize the USB camera (using Java) by doing this:

camera = CameraServer.getInstance().startAutomaticCapture()

and we are getting this:


CS: ERROR: ioctl VIDIOC_S_EXT_CTRLS failed at UsbCameraProperty.cpp:66: Input/output error (UsbUtil.cpp:122)
Exception in thread "NTListener" VideoException [edu.wpi.cscore.VideoException: property write failed]
at edu.wpi.cscore.CameraServerJNI.setProperty(Native Method)
at edu.wpi.cscore.VideoProperty.set(VideoProperty.jav a:68)
at edu.wpi.first.wpilibj.CameraServer.lambda$new$1(Ca meraServer.java:498)
at edu.wpi.first.wpilibj.CameraServer$$Lambda$2/3326003.apply(Unknown Source)
CS: USB Camera 0: set FPS to 0
Ehhh.. take a look at that last line. You aren't trying to set your FPS rate to 0 anywhere, are you? I could see why the ioctl call would pitch a fit if you did.

On the topic of camera stream properties we had a horrible time trying to set exposure and white balance through wpilib last year. This year we've put v4l-utils on the roboRio and are calling out to the shell to set them via v4l2-ctl instead. Works much better and you can run through them on the command line and get a lot better information about what's a valid setting and what isn't. One example being wpilib says exposure goes from 0 to 100 in the JavaDocs. It doesn't... it's not even constant across cameras. The Logitechs we use go from 3 to 2047.
Reply With Quote
  #12   Spotlight this post!  
Unread 02-02-2017, 21:53
skidad68 skidad68 is offline
Registered User
FRC #2506
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2013
Location: United States
Posts: 13
skidad68 is an unknown quantity at this point
Re: ioctl Errors and Intermediate Vision sample not working

I've seen that "set FPS to 0" problem too - not sure what's causing it as it is definitely not our code.

We seem to have worked around the ioctl errors by calling the camera setters multiple times from different places in the code. (e.g. in robotInit() and teleopInit()). Not sure why exactly that works...
Reply With Quote
  #13   Spotlight this post!  
Unread 02-02-2017, 21:56
Justin Buist Justin Buist is offline
Registered User
FRC #4003 (TriSonics)
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Allendale, MI
Posts: 27
Justin Buist is an unknown quantity at this point
Re: ioctl Errors and Intermediate Vision sample not working

Quote:
Originally Posted by MikePerreman View Post
im getting a "too many camera streams" as well. also, has anyone managed to switch cameras on the fly? mine keep throwing a fit.
We've gotten it to work. It's not too tricky. I'd say the only "gotcha" is that you should pull a frame from each camera well before you want to stream them as it can take the v4l subsystem a while to open everything up. If you try to open the new camera and grab that first frame upon switching you'll hang for a couple of seconds.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 15:26.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi